BlackBerry released the earnings results from its most recently completed quarter before opening bell this morning, posting adjusted earnings of 4 cents per share on $660 million in revenue. Analysts had been expecting losses of 4 cents per share on $792 million in revenue. In the same quarter a year ago, BlackBerry posted losses of 8 cents per share on $976 million in revenue.

BlackBerry Ltd Smashes Earnings Estimates, Misses Sales

Key metrics from BlackBerry’s earnings report

BlackBerry’s reported earnings were 5 cents per share, compared to losses of 80 cents per share in the same quarter a year ago.

Normalized positive cash flow was $76 million, compared to cash use of $784 million in the same quarter a year ago. BlackBerry saw a cash and investments balance of $3.27 billion, which matched the highest balance in the company’s history.

Non-GAAP gross margin was 48.3%, while GAAP gross margin was 48.2%. BlackBerry recorded a negative impact of $12 million related to currency fluctuations.

BlackBerry’s earnings results by segment

Software revenue rose 20% year over year to $67 million, making up about 10% of total revenue. Hardware revenue was 42% of the total, while services revenue was 47% of the total revenue.

BlackBerry recognized revenue on about 1.3 million BlackBerry smartphones and sold through about 1.6 million smartphones to end customers. The average selling price was $211, compared to the previous quarter’s $180.

“Our focus this past year was on getting our financial house in order while creating a multi-year growth strategy and investing in our product portfolio,” said BlackBerry Executive Chairman and CEO John Chen in a statement. “The second half of our turnaround focuses on stabilization of revenue with sustainable profitability and cash generation.”

Management still expects positive free cash flow in the near future.

Shares of BlackBerry where halted at the time of the earnings announcement for pending news to be released. Before the stock was halted, shares were up 1.29% to $9.42 per share at the NASDAQ.