BlackBerry maker Research In Motion Ltd. earned $796.7 million US or $1.46 per diluted share for the second quarter ended Aug. 28, compared with a profit of $475.6 million or 83 cents per share a year earlier.

Revenue was also sharply higher. It came in at $4.62 billion US, up from $3.53 billion, the Waterloo, Ont.-based company reported Thursday.

Analyst expectations compiled by Thomson Reuters were calling for revenue of $4.5 billion US and earnings per share of $1.34.

RIM said it added 4.5 million new BlackBerry smartphone users during the quarter. It shipped 12.1 million devices overall, better than the 11.8 million that analysts were expecting.

Those figures suggest the company is doing well in the cutthroat consumer market, where iPhone and Android smartphones provide tough competition for BlackBerry devices.

RIM co-chief executive Jim Balsillie said the company set a record for the number of BlackBerrys shipped in the quarter.

"We expect a continuation of this momentum in the third quarter as we extend the rollout of new products, including the BlackBerry Torch, into additional markets and benefit from heavy promotional activities and increasing customer demand as we head into the holiday buying season," Balsillie said in a release.

In its outlook for the third quarter, RIM said it expects revenue between $5.3 billion and $5.55 billion, while it adds between five million and 5.4 million net new subscribers.

Earnings per share for the quarter ended Nov. 27 are expected to be between $1.62 and $1.70 per diluted share, the firm said.

The company's shares were up more than nine per cent in after-hours trading.