Updated from 7:17 a.m. EDT

NEW YORK (TheStreet) –– BlackBerry (BBRY swung to a profit in the fourth quarter, as the John Chen-led company appears to be turning its fortunes around, led by the sale of new devices.

For the fourth quarter, BlackBerry earned an adjusted 4 cents a share on $660 million in revenue, as the company shipped 1.6 million smartphones. Analysts were expecting the Waterloo, Ontario-based company to lose 4 cents a share on $793.69 million in revenue.

"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. We now have a very good handle on our margins, and our product roadmaps have been well received," BlackerBerry's Executive Chairman and CEO John Chen said in a press release. "The second half of our turnaround focuses on stabilization of revenue with sustainable profitability and cash generation."

BlackBerry shares were rising in premarket trade Friday, gaining 1.1% to $9.40. The stock was halted earlier in the session for news.

The company reported a positive cash flow of $76 million in the quarter, up from a negative $784 million in the fourth quarter of 2014.

For the first quarter, BlackBerry said it expects to continue positive free cash flow, targeting sustainable non-GAAP profitability in fiscal 2016.