Shares rose 13 percent in premarket trading as CEO John Chen cut expenses quicker than expected.
The embattled smartphone company reported net income of $23 million, or 4 cents per share, for the three months ended May 31. It had reported a loss of $84 million, or 16 cents per share, a year ago.
Excluding unusual items, its adjusted loss was 11 cents per share in the latest period. Analysts surveyed by FactSet expected a loss of 35 cents per share.
Revenue fell to $966 million from $3.07 billion a year ago. Analysts expected revenue of $961.7 million.
Shares rose 1.08, or 13 percent, to $9.38 in premarket trading shortly before U.S. markets open.
"We are getting very close to making money or at least break even on hardware. Not quite there yet, but close," Chen said on a conference call with analysts.
It is the third quarterly results under Chen, who is deemphasizing the hardware business after last year's launch of the BlackBerry 10 failed to spark a turnaround. The BlackBerry has been hammered by competition from the iPhone as well an Android-based rival.
"He's doing exactly what John Chen should be doing. He's right sizing the business to fit demand. He is focused in the areas where he is still relevant. He's cut partnerships to shore up weaknesses," said Colin Gillis, an analyst at BGC Partners. "If they can get this business where they are selling a million phones a month they'll be a nice little niche. It will be a nice little profitable business."
BlackBerry sold 2.6 million phones in the quarter and reported cash and investments of $3.1 billion. Chen said 80 percent of BlackBerry's 50 million subscribers are business users.
"People stay with BlackBerry because they're enterprise users, there's high productivity and security. I would say 80 percent of that 50 million is this perfect base for us," Chen said.
Chen said the company will launch a new keyboard smartphone model called the BlackBerry Passport in London in September followed by the previously announced Classic in November.
Chen, who is credited with turning around
BlackBerry announced Wednesday that it is adding the Amazon Appstore to its phones. That will give users of the newest BlackBerry operating system easy access to thousands more of the most popular Android apps and games. The struggling smartphone maker has been criticized for the lack of applications available for its devices.