Research In Motion posted surprisingly strong quarterly earnings on Thursday and offered a rosy outlook that signaled further growth despite the global economic slowdown as consumers embrace its newest BlackBerry smartphones.

The results, which also revealed RIM now has a total of about 25 million BlackBerry subscribers, sent the company's shares about 21 percent higher in after-hours trade.

RIM's profit rose to $518.3 million, or 90 cents a share, in its fourth quarter ended February 28, from $412.5 million, or 72 cents, a year earlier.

The results topped the expectations of analysts, which had been dampened by a profit warning that RIM delivered in February.

They are crushing it, Canaccord Adams analyst Peter Misek said. Not only are they holding up, but it's clear they're gaining market share.

Revenue was $3.46 billion, up 84 percent from $1.88 billion in the year-before quarter, putting it on the high end of RIM's December forecast for revenue of between C$3.3 billion and $3.5 billion.

This is wildly better than people were looking for, DSAM Consulting analyst Duncan Stewart said of the company's overall results. Getting improvement in both margin and growth at the same is a rare thing in the field of technology.

For the current quarter ending May 30, RIM expects revenue of between $3.3 billion and $3.5 billion and earnings per share of 88 cents to 97 cents. Gross margin is expected to come in between 43 and 44 percent, the company said, up from 40 percent currently.

It expects to add between 3.7 million and 3.9 million subscribers. It added 3.9 million this quarter.

Analysts had previously expressed concern about RIM's ability to maintain momentum during the recession.

But such worries -- as well as the February profit warning -- seemed like ancient history on Thursday as RIM's shares jumped to $59.52 in late trading from their regular-session close of $49.09 on the Nasdaq.

Still, the company is keeping a close eye on operating expenses to make sure it can continue to thrive even if the downturn continues, RIM co-CEO Jim Balsillie said during a conference call with analysts.

RIM is faring well in the current environment and we continue to believe we can grow market share, he said.

However, we believe it is prudent to turn our attention to making sure that the operations are as streamlined as possible in case of further deterioration in the broader economy.

CONSUMER DEMAND RETURNS

Retail consumers in general have curbed spending, which may mean they are not willing to pay more for flashy new smartphones. But the plunge in spending may be coming to an end, Misek said.

There was a big rebound in consumer demand in mid-February, he said, adding BlackBerry handsets are selling well with wireless carriers such as Verizon and Vodafone .

Balsillie said BlackBerry demand in the retail market was stronger than the company had expected following the holiday season, in part thanks to aggressive promotions from carriers.

Meanwhile, large corporations that use the BlackBerry as the mobile communications tool of choice have also cut their budgets. Even so, Balsillie said, demand from corporate customers is also staying strong.

RIM's main customers have traditionally been business executives, lawyers, politicians and other professionals who use its BlackBerry handsets to send wireless email securely.

To diversify its user base, RIM has pushed aggressively into the broader consumer market with multimedia-laden handsets like the Pearl model and the touchscreen BlackBerry Storm -- its answer to Apple's popular iPhone.

This week, it also launched an online store to sell entertainment, games, news and travel software to BlackBerry users.

While the iPhone has been a hit with consumers, it has yet to gain enough traction with business users to threaten RIM's dominant position in the corporate client market.

($1=$1.24 Canadian)

(Reporting by Wojtek Dabrowski; Editing by Frank McGurty)