Shares of BlackBerry maker Research In Motion jumped more than 20 percent on Friday, a day after the company surprised investors with a strong profit report and a rosy outlook for its smartphones despite a grim economy.

RIM shares rose C$13.61 to C$74.60 on the Toronto Stock Exchange shortly after the opening bell. On the Nasdaq, the stock shot up $10.29 to $59.38.

In results that seemed to defy the global economic meltdown, RIM said retail demand was stronger than it expected after the holiday season, partly due to big promotions from phone companies.

The company's forecast also exceeded analysts' expectations. RIM said it expects first-quarter sales of $3.3 billion to $3.5 billion, earnings per share of 88 cents to 97 cents and gross margin between 43 and 44 percent. It also expects to add between 3.7 million and 3.9 million subscribers.

Gross margins are currently at about 40 percent.

Many analysts raised their earnings estimates and stock targets to reflect the recovery in growth and margins. For example, Caris & Company analyst Robert Cihra hiked his estimates for the year and raised his stock price target to $80 from $60.

In the fourth quarter, RIM's profit rose to $518.3 million, or 90 cents a share, from $412.5 million, or 72 cents a share, a year earlier. It added 3.9 million subscribers for a total of about 25 million subscribers.

This quarter affirms RIM's solid fundamentals and competitive advantages, which we expect will boost RIM's global share gains versus incumbent handset vendors, RBC Capital Markets analyst Mike Abramsky said in a note. He raised his stock price target to $80 from $75 and maintained his outperform rating.

Analysts had previously worried about RIM's ability to maintain momentum during the recession, a concern fed by the company's February 11 profit warning.

Paradigm Capital analyst Barry Richards said that the results and forecast should alleviate all concerns over RIM's ability to recover lost gross margins and to continue growing the business profitably.

($1=$1.24 Canadian)

(Reporting by Wojtek Dabrowski and Susan Taylor; editing by Peter Galloway)