Canada's Research In Motion says it sold about 1 million of its new BlackBerry 10 devices, as the company surprised Wall Street by returning to profitability in the most recent quarter.
The earnings provide a first glimpse of how RIM's new touch-screen BlackBerry Z10 is selling internationally since its debut on January 31.
The 1 million sales of the Z10 phones exceeded the 915,000 analysts had been expecting.
The BlackBerry, pioneered in 1999, was the dominant smartphone for on-the-go business people and other consumers before the iPhone debuted in 2007, and showed that phones can handle much more than email and phone calls.
RIM faced numerous delays modernising its operating system with the BlackBerry 10. During that time, it had to dismiss more than 5000 employees and saw shareholder wealth decline by more than $US70 billion ($67 billion).
In the quarter that ended March 2, RIM earned $US98 million, compared with a loss of $US125 million a year earlier.
Revenue fell 36 per cent to $US2.7 billion, from $US4.2 billion.
Despite the sales of the BlackBerry 10, RIM lost about 3 million subscribers, to end the quarter with 76 million.
Bill Kreher, a tech analyst for Edward Jones, called the decline "pretty alarming".
"This is going to take a couple of quarters to really see how they are doing," Mr Kreher said.
RIM, which is changing its name to BlackBerry, said it expected to break even in the current quarter.
"To say it was a very challenging environment to deliver improved financial results could well be the understatement of the year," chief executive Thorsten Heins said during a conference call with analysts.
"I thought they were dead. This is a huge turnaround," Jefferies analyst Peter Misek said from New York.
Mr Misek said the Canadian company "demolished" the numbers, especially its gross margins. RIM reported gross margins of 40 per cent, up from 34 per cent a year earlier. The company credited higher average selling prices and higher margins for devices.