Interested in learning what's next for the gaming industry? Join gaming executives to discuss emerging parts of the industry this October at GamesBeat Summit Next. Register today.

Canada’s most well-known tech company is finally back in the black.

Struggling smartphone maker BlackBerry today reported a profit of $23 million, or 4 cents a share, on total revenue of $966 million. That net income is based on generally accepted accounting principles (GAAP), which consider the company’s real estate sales and a tax refund. Excluding those items, BlackBerry’s adjusted loss for the first fiscal quarter of 2015 totaled $60 million, or 11 cents a share — substantially less than the 26 cents per share loss analysts anticipated.

“Over the past six months, we have focused on improving efficiency in all aspects of our operations to drive cost reductions and margin improvement,” said BlackBerry CEO John Chen in a statement. “Looking forward, we are focusing on our growth plan to enable our return to profitability.”

Today’s earnings report suggests a return to stability for BlackBerry, which has been shedding revenue at a perilous rate. Revenue declined only 1% compared to the previous quarter.

To return BlackBerry to profitability, Chen has focused on cutting costs dramatically and pivoting the company’s core business to software and services, which produced 61% of the company’s revenue this past quarter. Operational costs declined to $400 million, a 40% drop from the same period last year, while research and development costs dropped by almost 34% to $237 million.

The markets rewarded BlackBerry for its better-than-expected earnings report this morning. The company’s stock is up 13.6% at the time of publication.

VentureBeat's mission is to be a digital town square for technical decision-makers to gain knowledge about transformative enterprise technology and transact. Learn more about membership.