Goodbye Research In Motion, and hello BlackBerry. The newly rechristened smartphone maker shipped 1 million of its new Z10 devices last quarter, and the company posted a surprise profit.

BlackBerry's (BBRY) fiscal fourth quarter, which ended March 2, was a transitional one. The company finally launched its long-delayed BlackBerry 10 operating system in January, and rolled out the first phone to run on the new software a few weeks later.

That phone, the Z10, launched in February in Canada, the U.K. and the United Arab Emirates -- only a few weeks before the end of the quarter. The Z10 went on sale in the United States at AT&T (T) last Friday and hits Verizon (VZ) stores today.

Overall, BlackBerry earned $94 million, or 18 cents per share, in the fourth quarter. Analysts polled by Thomson Reuters had expected a the company to lose 29 cents per share. The company said it was able to swing to a profit due to a cost-cutting initiative that began during the quarter, including making its supply chain more efficient. BlackBerry lost $118 million a year ago.

In prepared remarks, CEO Thorsten Heins credited "numerous changes at BlackBerry over the past year" with the company's return to profitability.

Still, BlackBerry's sales of $2.7 billion during the quarter disappointed. Wall Street analysts had expected the company to bring in $2.8 billion in revenue. The company shipped just 6 million smartphones in total, and its subscriber base fell to 76 million.

"To say it was a very challenging environment ... would be the understatement of the year," Heins added later, on a post-earnings conference call with analysts.

One analyst asked Heins how many of the 1 million Z10 phone shipments to stores have actually sold to customers. Heins put the figure "roughly" at two-thirds to three-quarters.

Investors knew BlackBerry's fourth-quarter results wouldn't say much about the success or failure of the newly launched Z10. For that, analysts will be looking to the company's first-quarter results. BlackBerry said it expects to break even during the current quarter, despite raising its marketing spending by 50%. Wall Street analysts had been expecting a small loss.

On the conference call, Heins said BlackBerry 10 is the "beginning, certainly not the end" of the company's turnaround. "Everybody at BlackBerry understands there is still more work to be done," he added.

Specifically, Heins sees several areas for potential revenue growth: autos, healthcare, security, defense, enterprise, and licensing of BlackBerry 10.

"Our vision is to expand from being a smartphone company to being a leader in mobile computing," Heins said.

Shares ended Thursday about 1% lower, at $14.45.

Related story: Inside BlackBerry's last stand

BlackBerry's stock has enjoyed a strong comeback since the company said last year that BlackBerry 10 would finally be unveiled in January after long delays. Shares are up 91% over the past six months, but the stock has been extremely volatile.

That's partly because many investors are still betting against BlackBerry. As of March 15, nearly one-third of shares were held by short-sellers who think that BlackBerry's stock will fall. That's a whopping percentage, and it has contributed to BlackBerry's wild swings as "shorts" are occasionally forced to buy up shares in order to cover their positions.

Ultimately, investors will want to see more evidence that BlackBerry's new phones can make a dent in what's a highly competitive mobile market.

Devices made by Samsung and others that run on Google's (GOOG) Android operating system have become popular. Apple (AAPL)is, of course, still a significant player. And Nokia (NOK) is also gunning for smartphone users with new Lumia phones that run on mobile software from Microsoft (MSFT).

BlackBerry is hoping its new operating system will usher in a new era for the company. Meanwhile, another era is ending: Mike Lazaridis, who co-founded the company in 1984 and served as co-CEO until 2012, is stepping down from the board on May 1. Last week, Lazaridis announced he is starting a venture fund called Quantum Valley Investments.