Materials stocks carried the Toronto Stock Exchange higher on Friday, but the benchmark index still finished with a hefty weekly loss thanks to three days of steep declines.

A late-day surge sent the S&P/TSX composite index up 166.45 points, or 1.6%, to 10,287.95. For the week, the index dropped 3.6%.

The materials group rose by 2.7% as gold futures advanced. On the Comex division of the New York Mercantile Exchange, August gold rose US$1.60, or 0.2%, to end at US$936.20 an ounce. For the week, the contract slipped by 0.5%.

The sub-gold index surged 3.9%.

Higher for the day was Barrick Gold Corp., up 3.2% to $38.64 and Kinross Gold Inc., up 5.9% to $20.49.

Shares of Goldcorp Inc. rose $1.58, or 4.2%, to $39.55.

Also sharply higher was First Quantum Minerals Ltd., up $3.23, or 6.2%, to $55.23.

Potash Corp. finished lower at $105.90, down $1.96, or 1.8%.

The financials group climbed 2.1% during Friday’s trading.

Royal Bank of Canada shares gained 2% to $46 and Bank of Nova Scotia rose 2.5% to $41.30.

Shares of Sun Life Financial Inc. jumped $1.15, or 3.7%, to $31.90.

Also higher was Power Corp., up 7.5% to $25.99 and National Bank of Canada, up 2.7% to $55.67.

Energy stocks gained 1.3% on Friday despite a drop in oil futures. Crude for July delivery fell US$1.82, or 2.6%, to US$69.55 a barrel on New York Mercantile Exchange. The contract shed 3.3% this week.

Shares of Husky Energy Inc. rose 3% to $32.33 and Petro-Canada gained 1.8% to $44.42.

Niko Resources Ltd. surged $4.13, or 5.7%, to $77.13.

Suncor Energy Inc. finished at $35.22, up 2.4%.

Meanwhile, shares of Research In Motion Ltd. tumbled 3.1% after the BlackBerry-maker revealed a second-quarter profit outlook that was weaker than some analysts had expected. RIM shares fell $2.70 to $84.10.

The drop in RIM shares dragged the information technology group of stocks down 1.5% on Friday.

Junior stocks also advanced Friday, sending the TSX Venture composite index up 4.49 points, or 0.4%, to 1,118.80.

The Canadian dollar slipped US0.14¢ to close at US88.10¢.

The main stock market indices in New York were little changed on Friday, but also finished the week with losses.

The Dow Jones industrial average closed at 8,539.73, down 15.87 points, or 0.2%. The blue-chip average finished the week down 3%.

The S&P 500 index edged up 2.86 points, or 0.3%, to 921.23, but closed down 2.6% for the week.

The Nasdaq composite index advanced 19.75 points, or 1.1%, to 1,827.47. It was off 1.7% for the week.