BlackBerry’s (BBRY) fourth-quarter earnings released Thursday gave the company and its fans the best possible news: It will live to fight another day. Note that being able to fight another day does not imply that BlackBerry is destined to win since the company still faces several major challenges on the road to full recovery. But before we get into those, we should step back and really appreciate the way BlackBerry has scraped its way back to profitability over the last quarter because it’s no small achievement.

Let’s recall that at the start of its fiscal year, BlackBerry was losing money at an alarming rate and posted a net loss of over $500 million in Q1 2012. Since then the company has made a number of structural changes, including consolidating its production facilities and outsourcing its repair operations, that have significantly reduced its operating costs and have helped the company eke out a profit for the first time in three quarters.

Consensus expectations were for BlackBerry to post a net loss of $0.39 per share last quarter and it ended up turning a profit of $0.22 per share. BlackBerry CEO Thorsten Heins said on Thursday that the company had improved its cash position from $2.1 billion at the start of the quarter to $2.9 billion by the end of the quarter. This is all extremely impressive and a tribute to the company’s gritty determination to succeed under challenging circumstances.

That said, there were some red flags in BlackBerry’s earnings report that show that the company still faces significant headwinds and is by no means out of the woods. The scariest part from BlackBerry’s perspective is the fact that its subscriber numbers plummeted to 76 million on the quarter, a net loss of 3 million subscribers from the previous quarter. It goes without saying that BlackBerry won’t likely lose 3 million subscribers per quarter for the rest of the year, but that number has to be worrisome for the company.

Another potentially worrisome sign for BlackBerry is that it’s cut its research and development spending at a time when the competition is incredibly tough for both the high-end and the low-end market. BlackBerry doesn’t just have to worry about the evil empire at Apple (AAPL) anymore, it has to worry about Samsung (005930), which has signalled its intention to make a major move for BlackBerry’s enterprise customers. Given that both Apple and Samsung are in a fierce battle with one another to deliver the most cutting-edge and innovative smartphone features, BlackBerry can ill afford to fall behind again and risk looking out of date.

And finally, there’s BlackBerry’s standing in the emerging markets that have helped keep it afloat through tough times. Heins said during his call with investors Thursday that the company would release a mid-range BlackBerry 10 smartphone for emerging markets sometime in the fall. But with both Nokia (NOK) and Samsung already making big pushes into BlackBerry’s emerging market territory in the first half of 2013, you have to wonder if the company’s decision to not release a mid-range version of the Z10 during the initial BlackBerry 10 launch will come back to haunt it.

Despite all these daunting problems, though, it’s good to see BlackBerry profitable again. And at the end of the day, it’s better to be making money in challenging times than losing money in challenging times.