SAN FRANCISCO – BlackBerry Inc. reported a surprise operating profit for its fourth fiscal quarter on Thursday, thanks to ongoing cost reductions and shipments of its new Z10 handset hitting the 1 million mark.

On the negative side, the company lost about 3 million subscribers during the period. And it will spend big on marketing in the current quarter, when it will face fresh competition from the Galaxy S 4 from Samsung.

“Considering the push-and-takes with news-flow, which seems to change on a weekly basis, an investment in Blackberry is not for the faint-hearted,” Mark Sue of RBC Capital wrote in an afternoon note to clients.

The results included a mix of metrics that will likely be interpreted differently by investors, depending on the view they already had on the company, which is still in the process of changing its name from Research In Motion. BlackBerry is a heavily shorted stock, with 44 percent of the covering brokers rating the shares as a sell. Another 7 analysts maintain buy ratings.

“In the short term, the company has done a good job on its cost reductions and made a solid quarter on operating margins,” Mike Walkley of Canaccord told MarketWatch. “In the long term view of the stock, both the bulls and bears have good cases.”

Walkley rates BlackBerry as a sell, and noted that the subscriber loss was a “worrisome sign” in a quarter with a major new launch.

On the company’s conference call, CEO Thorsten Heins said that about 55 percent of those buying the new Z10 handset “are coming from platforms other than BlackBerry,” according to early data.