Toronto stocks rallied Friday, boosted by climbing resource prices and a strong earnings report from Research in Motion Inc., which saw investors rushing in to buy the BlackBerry wireless device maker.

The S&P/TSX composite index surged 190.90, or 1.39%, to 13,906.57.

The senior and junior exchanges will be closed on Monday as part of the Canada Day long weekend.

All 10 TSX main sub-groups ended higher on the session.

Information technology sector gained 6.11%.

RIM shares climbed $39.18, or a whopping 22.36%, to $214.40 after announcing a quarterly profit gain of 73%. The company also announced it was splitting its stock three-for-one.

The energy sector rose 1.31%.

Light, sweet crude for August delivery shot up $1.11 to close at US$70.68 a barrel on the New York Mercantile Exchange.

EnCana Corp. gained 90¢, or 1.39%, to $65.52.

The materials sector moved up 1.29%, while the gold sub-index gained 1.31%.

Gold for August delivery gained 50¢ to close at US$650.90 an ounce on the Nymex.

LionOre Mining International Ltd. shares gained 50¢ to $27.95 after its shareholders accepted a $6.8 billion takeover bid from Norilsk Nickel.

The Canadian dollar was down 0.53 of a cent to US93.86¢.

The S&P TSX Venture Exchange rose 40.36, or 1.29%, to 3,174.39.

In New York, markets closed lower as investors reacted to higher oil prices.

The Dow Jones industrial average fell 13.66, or 0.10%, to 13,408.62, the Nasdaq composite index gave up 5.14, or 0.20%, to 2,603.23, and the S&P500 fell back 2.36, or 0.16%, to 1,503.35.

Despite a weak performance for the month of June, all three indexes gained for the quarter. The blue-chip Dow average gained 8.5%, the S&P 500 rose 5.8% and the Nasdaq climbed 7.5%.

For the week, the Dow rose 0.4%, the S&P 500 inched up 0.05% and the Nasdaq gained 0.6%.