WATERLOO, Ont. -- BlackBerry Ltd. (TSX:BB) squeezed out a small profit in the fourth quarter, giving analysts a welcome surprise, even though overall revenues were still well short of their expectations.

The struggling technology company, which reports in U.S. dollars, earned US$28 million or five cents per share in the quarter compared with a loss of $423 million or 80 cents per share a year earlier.

Adjusted earnings were US$20 million, or four cents a share, beating analyst estimates of a loss of four cents per share.

The results were less impressive when it came to BlackBerry's revenue, which includes sales of its phones and software services. Overall revenue dropped 32 per cent from a year ago to $660 million, significantly lower than analyst expectations for $786 million.

The pressure came from several directions, as device sales continued to stumble and BlackBerry accounted for a US$12-million hit from currency fluctuations.

On the upside, the company shovelled another $608 million of cash into its reserves, bringing the total to $3.27 billion at the quarter's end.

Shares of BlackBerry were up 54 cents at $12.14 in trading on the Toronto Stock Exchange on Friday morning.

BlackBerry has been struggling as its smartphones have failed to connect with the consumer market while its once thriving business software and security business has faced an onslaught of competition.

John Chen was brought in as CEO just over a year ago with the main goal of making BlackBerry profitable again. He began a widespread effort to reduce costs, and reshape BlackBerry's business model.

Cost management was a major focus of the quarter, which ended Feb. 28, as BlackBerry pulled back expenses another 22 per cent to $424 million compared to the third quarter.

However, the popularity of BlackBerry phones is still fading across most regions.

In the fourth quarter alone, sales of BlackBerrys dropped 38 per cent in North America, 23 per cent in Europe, the Middle East and Africa and 29 per cent. The Asia-Pacific region, where BlackBerry continues to enjoy a stronger popularity in some countries, sales dropped a lesser 14 per cent.

About 1.6 million BlackBerrys were sold to customers in the quarter, a figure that includes its Classic model, a throwback to its popular older smartphones with an updated design.

The phone launched in Canada and some other countries last December, but the rollout was staggered across other regions like the United States and Europe, which means revenue recognition has been spread out.

The factor added extra weight to already struggling device sales, which have been on a steady decline. In the third quarter, which ended in November, BlackBerry booked revenue on about 1.9 million devices, while in the second quarter about 2.1 million phones sold to consumers.

Chen told analysts on a conference call that even though phone sales are weaker, the latest devices have higher margins than their predecessors.

"We do expect the devices to become increasingly profitable as we move into the second half of the year," he said.

"In order to minimize exposure we have been successful in managing inventory to closely match the demand."

Software revenues are becoming a stronger area of growth, with sales rising 20 per cent to $67 million over a year earlier. However, software only makes up 10 per cent of overall revenue, while the hardware business represents 42 per cent. Service fees deliver most of the rest.

Chen has stated in recent months he wants BlackBerry to generate US$500 million of software revenues in the company's new financial year, which began this month.

He told analysts that BlackBerry's turnaround plan is still in progress.

"I'd like to remind everybody that we're only halfway through," he said.

"Our focus now is turning to stabilizing revenue and I'm mindful that transitions like this are never easy and never just quite smooth."