BlackBerry (BBRY) posted a surprise fourth-quarter profit, beating Wall Street expectations in the first period to include sales of its new Z10 touchscreen smartphone.

Shares of BlackBerry jumped 4% to $15.15 in pre-market trading Thursday.

The Canadian mobile device maker said it recorded a $98 million profit, or 19 cents a share, turning around a $125 million loss, or 24 cents a share, from the year-ago period.

Adjusted earnings checked in at 22 cents a share, well above estimates for a loss of 29 cents.

It was the second consecutive profitable quarter for BlackBerry, which prior to the streak recorded several quarterly losses.

However, revenue fell to $2.68 billion and missed estimates for $2.85 billion. BlackBerry posted $4.18 billion in fourth-quarter revenue last year.

BlackBerry also lost about three million subscribers, closing the period with 76 million.

During the latest quarter, BlackBerry shipped a total of six million smartphones, including one million BlackBerry 10 units.

Despite increased marketing costs for the BlackBerry Z10 launch, the company did close out the fourth quarter with a level cash position of $2.9 billion, compared with the third quarter.

BlackBerry projected a break-even period in the first quarter, while marketing costs for its new BlackBerry 10 phones will increase 50%.

“As we go into our new fiscal year, we are excited with the opportunities for the BlackBerry 10 platform, and the commitments we are seeing from our global developers and partners,” President and CEO Thorsten Heins said in a statement.

BlackBerry also announced its co-founder and former co-chief executive, Mike Lazaridis, is stepping down from the board. He had served as nonexecutive vice chairman since early last year.

“With the launch of BlackBerry 10, I believe I have fulfilled my commitment to the Board,” Lazaridis said. “We have a great deal of which to be proud. I believe I am leaving the company in good hands. I remain a huge fan of BlackBerry and, of course, wish the company and its people well.”

Follow Matthew Rocco on Twitter @MatthewRocco