TORONTO - The Toronto stock market came back from a sharp loss to end the session higher Friday after the U.S. Treasury said it would step in to prevent a collapse of the major American automakers.

The move came after the U.S. Senate voted down a US$14-billion bailout package last night.

"It's taken some of the shock waves out of the market -- (indexes) would have been down at least six per cent probably today if we hadn't seen that news from Treasury," said Andrew Pyle, investment adviser at Scotia McLeod in Peterborough, Ont.

The S&P/TSX composite index closed up 123.55 points to 8,515.45, gaining 398.42 points or 4.9 per cent this week, mainly due to higher base and precious metal stocks.

New York's Dow Jones industrial average closed 64.59 points higher at 8,629.68 after the Treasury Department said it "will stand ready to prevent an imminent failure until Congress reconvenes and acts to address the long-term viability of the industry."

"It's hardly what I would call a bailout package because there are no conditions really tied to it, it's just survivability," Pyle said.

"But it passes on the baton basically saying, look, you guys make the decision, we really don't have the moral majority in Washington right now to make a decision that has such wide ranging ramifications so therefore we will just bridge it. It's like buying a house and getting a bridge loan to the closing date."

Automaker shares closed well off early lows with General Motors Corp. (NYSE:GM) off 18 cents to US$3.94 while Ford Motor Co. (NYSE:F) gained 14 cents to US$3.04.

Losses for Canadian auto parts makers moderated with Magna International (TSX:MG.A) dipping six cents to $35.51, while Linamar Corp. (TSX:LNR) slipped 16 cents to $4.20 after General Motors (NYSE:GM) said Friday it will shut down virtually all of its North American production for the entire month of January.

Shares in BCE Inc. (TSX:BCE) lost 80 cents to $21.23 after the telecom company said it is reinstating its dividend at 36.5 cents per share quarterly.

The parent company of Bell Canada also plans to buy back as much as five per cent of its common stock. This follows the collapse of its $52-billion deal to be taken over by an investor group led by the Ontario Teachers' Pension Plan.

The TSX Venture Exchange was down 5.3 points to 718.74, while the Canadian dollar moved down 1.14 cents to 79.92 cents US.

The Nasdaq composite index rose 32.84 points to 1,540.72 while the S&P 500 edged up 6.14 points to 879.73.

The Toronto financial sector ticked 3.3 per cent higher as Royal Bank (TSX:RY) added 84 cents to $34.80 and Scotiabank (TSX:BNS) added 64 cents to $30.90.

The TSX energy sector slipped 0.35 per cent oil prices fell sharply on another round of poor economic news that showed consumers cutting back on spending for a record fifth straight month.

The January crude contract in New York fell $1.70 to US$46.28 a barrel. That followed two days of gains on the expectation of a big cut in production when the OPEC cartel meets next Wednesday.

Suncor Inc. (TSX:SU) was down 90 cents to $25.07.

The gold sector was a bright spot, up five per cent even as the price of the precious metal declined $6.10 to US$820.50.

Barrick Gold Corp. (TSX:ABX) moved ahead $1.01 to $38.91.

The base metals sector climbed 2.2 per cent with Teck Cominco Ltd. (TSX:TCK.B) ahead 18 cents to $5.45.