The prevailing wisdom was that Nokia was spiraling the drain by the end of 2012, but the struggling smartphone maker provided some unexpectedly good news. Nokia’s smartphone sales not only exceeded expectations in the quarter, but the firm’s Devices & Services business unit “achieved underlying profitability.”

In a bid to reverse its falling fortunes, Nokia took the rare step of announcing these milestones ahead of its fourth-quarter financial performance.

“We are pleased that Q4 2012 was a solid quarter where we exceeded expectations and delivered underlying profitability in Devices & Services,” Nokia CEO Stephen Elop is credited as saying in a prepared statement. “We focused on our priorities and as a result we sold a total of 14 million Asha smartphones and Lumia smartphones while managing our costs efficiently, and Nokia Siemens Networks delivered yet another very good quarter.”

According to Nokia, its Mobile Phones business unit and Lumia portfolio delivered better-than-expected results, operating expenses were lower than expected, and it delivered a positive operating margin in Devices & Services.

The firm sold an estimated 86.3 million handsets in the quarter, including 9.3 million Asha devices, 4.4 million Lumia smartphones, and 2.2 million Symbian smartphones. Total smartphone sales were 15.9 million units.

It’s not all good news, of course: Nokia warned that its operating margin in the current quarter will be negative 2 percent. And the firm found itself in a troubling position this week when Mr. Elop seemed to hint that it was hedging its bets on Windows Phone, which it uses in its Lumia lineup. A Nokia representative later reaffirmed that the company is “100 percent” committed to Microsoft and “the Windows platform.” Which I’d remind readers is not the same as Windows Phone. A hint at future tablet products?

Nokia will announce its final fourth quarter and full-year 2012 financial results on January 24.