TORONTO - The Toronto stock market closed lower Monday as talks on a deal to raise the U.S. debt ceiling remain stalled and market heavyweight Research In Motion Ltd. (TSX:RIM) added extra drag as the BlackBerry maker announced big job cuts.

The S&P/TSX composite index was off early lows, as energy and mining stocks gained ground, but still closed down 58.68 points to 13,435.95 while the TSX Venture Exchange slipped 22.98 points to 2,036.63.

The Canadian dollar was up 0.37 of a cent to 105.73 cents US.

RIM fell $1.28 or 4.84 per cent to $25.19 after the company said it is eliminating 2,000 jobs, or about one-tenth of its workforce. RIM has been losing market share of its smartphone to Apple Inc.'s iPhone. The Waterloo, Ont.-based company said last month that its quarterly revenue could drop for the first time in nine years.

Before Monday's announcement, its stock had tumbled 52 per cent this year.

"There is a long way for them to go to regain a competitive position in the marketplace," said Kate Warne, Canadian markets specialist at Edward Jones in St. Louis., adding her company has a sell rating on RIM.

"And their promises and lack of execution over the last year have left us disappointed at their ability to turn this around any time soon."

Talks between U.S. president Barack Obama and House Speaker John Boehner collapsed on Friday and no progress has been made since on raising the debt limit.

The U.S. government's borrowing authority lapses on Aug. 2 -- a week from Tuesday. The Obama administration and many others say that scenario would risk a first-ever federal default, with higher interest rates and other devastating effects cascading through the entire economy.

"It's all politics," added Warne.

"I do think they will figure out how to come to some kind of arrangement and raise the debt ceiling. But between now and then there is going to be a lot of volatility and a lot of uncertainty because I don't think they will get an agreement until the last minute."

The gold sector headed lower even as nervous investors seeking safe havens pushed gold prices further into record territory with the August contract on the Nymex closing up $10.70 to US$1,612.20 an ounce after earlier going as high as US$1,624.30. Barrick Gold Corp. (TSX:ABX) was down 60 cents to C$47.02 while Goldcorp Inc. (TSX:G) faded 88 cents to $50.59.

The consumer discretionary sector fell 1.18 per cent with shares in Thomson Reuters (TSX:TRI) down 63 cents to $33.13. The company announced a shakeup of its Markets division on Friday involving the departure of five more senior executives. The division has posted disappointing revenue growth amid slow sales of its key new Eikon product for financial professionals.

The financials sector lost 0.47 per cent as Royal Bank (TSX:RY) shed 43 cents to $52.82 and Sun Life Financial (TSX:SLF) fell 34 cents to $27.19.

The industrials sector was down 0.35 per cent with Bombardier Inc. (TSX:BBD.B) down 18 cents to $5.94 after RBC Capital Markets downgraded its shares Friday to sector perform from outperform over concerns about potential delays and order challenges facing its new CSeries aircraft.

Canadian National Railways (TSX:CNR) added 32 cents to $75.24 ahead of the release of quarterly earnings after the market close.

The energy sector was flat as oil prices fell amid investor concern that the lack of an agreement among U.S. lawmakers to raise the country's debt limit could also damage the global economy.

The September contact on the New York Mercantile Exchange lost 67 cents to US$99.20 a barrel. Imperial Oil (TSX:IMO) gained 26 cents to $44.46.

The base metals sector was the sole advancer, up 0.32 per cent as copper prices shook off early losses and the September contract was unchanged at US$4.41 a pound. Lundin Mining (TSX:LUN) advanced 11 cents to C$6.97 while Sherritt International (TSX:S) slipped 17 cents to $6.47.

European government debt worries also focused investor attention as Moody's downgraded Greece's bond ratings by a further three notches. The ratings agency also warned that it is almost inevitable the country will be considered to be in default following last week's new bailout package.

The agency said the new EU package of measures implies "substantial" losses for private creditors.

New York markets were also lower with the Dow Jones industrials down 88.36 points to 12,592.8.

The Nasdaq composite index dropped 16.03 points to 2,842.8 while the S&P 500 index was down 7.59 points to 1,337.43.

In other corporate news, Valeant Pharmaceuticals International Inc. (TSX:VRX) said it has received approval from Health Canada for its insomnia treatment Sublinox. The approval allows Valeant to move towards marketing the drug in Canada and its shares declined 75 cents to $52.84.