Image source: Cliffs Natural Resources investor presentation.

What: Shares of iron ore producer Cliffs Natural Resources (CLF -1.24%) are up 30% as of 11:45 a.m. ET today after reporting a profitable quarter that completely caught Wall Street off guard. Most analysts were expecting a loss for the quarter.

So what: After two straight years of deep losses, Cliffs Natural Resources reported GAAP earnings per share of $0.64, which was well above Wall Street's expectations of a loss of $0.22 per share. While the company did see declining revenues from low iron ore prices and cuts to production, it was also able to cut costs at both its U.S. and Australian operations. It also helped immensely that it didn't take large losses on its discontinued operations, which totaled $928 million this quarter last year.

The company also realized a $178 million gain on the retirement of some debt, so from a normalized earnings perspective, the company still did lose money to the tune of $0.36 per share, but the fact that it was able to turn a decent profit on a GAAP basis was enough to send shares soaring. 

Now what: Certainly, today's news was a welcome change to a tough couple of years for iron ore producers, but there's a long way to go before Cliffs is completely out of the woods here. It still has $2.5 billion in long-term debt that needs to be addressed, and any downturn in iron ore prices could upend these gains very quickly. Cliffs does look like a more promising stock than a year ago, but there is still a bit of risk involved in owning shares right now.