Blackberry posted a profit of $14m excluding one off charges for restructuring costs and a write-down of some of its assets.
The smartphone maker’s losses hit $670m in the first quarter compared, to $238m in the previous quarter.
Despite the hit, Blackberry shares gained in early trading as it said losses for the whole year would be lower than expected.
Chief executive John Chen said greater efficiencies and strong growth in software and services would trim its losses.
He said losses would be around 15 cents per share, compared with analysts’ forecasts of 33 cents per share.
“They have not put figures behind some of their forecasts in quite some time, and hopefully that speaks to improved visibility into the business,” said Morningstar analyst Brian Colello.
Blackberry is moving away from smartphone sales – in which it has less than 1% of the global market – and towards the device software used by companies and governments.
The company said sales of its handsets, which had an average selling price of $290, were below projections in the quarter.
Total revenue across the business dropped 14% to $400m in the three months to the end of May.