* TSX down 25.27 points, or 0.21 percent, at 11,838.29
* Fed to reinvest maturing mortgage debt into Treasuries
* Eight of TSX's 10 sectors lower (Adds details, quote)
By Jennifer Kwan
TORONTO, Aug 10 (Reuters) - Toronto's main stock index ended lower on Tuesday but trimmed losses after the U.S. Federal Reserve said it would reinvest maturing mortgage debt in government bonds to support economic recovery.
The resource-heavy Canadian index, which early in the day fell more than 100 points on soft economic data from the United States and China, rallied into positive territory briefly after the Fed move. [ID:nN09275781]
"The Fed is engaging in further monetary accommodation, which is supportive of the markets," said Fergal Smith, managing market strategist at Action Economics.
Serge Pepin, head of investments at BMO Investments Inc, said there had been "anxiety as to was the Fed prepared to revive the quantitative easing".
"The fact that it didn't, the fact that it is still sort of holding off to see if there's anything way more negative in the economy, gave optimism to investors ... that the recovery is still on track; perhaps that the slowdown and the economic recovery is not as dire as perhaps anticipated," he said.
Also cushioning the TSX's fall was strength in the price of gold, which helped boost Barrick Gold (ABX.TO) by 1 percent to C$44.93, and fellow gold miner Agnico-Eagle (AEM.TO) by 1.8 percent to C$62.85. [GOL/]
The Toronto Stock Exchange's S&P/TSX composite index .GSPTSE finished the day down 25.27 points, or 0.21 percent, at 11,838.29, with eight of its 10 sectors lower.
The blue chip S&P/TSX 60 index .TSE60 closed 0.7 of a point, or 0.1 percent, lower at 692.15.
Declining stocks included Royal Bank of Canada (RY.TO), down 0.2 percent at C$53.35; Canadian Natural Resources, down 2 percent at C$36.13; and Teck Resources TCKb.TO, which fell 0.7 percent to C$36.06.
The index's three key sectors -- energy, financial and materials -- fell as data showed U.S. business productivity fell for the first time in 1-1/2 years in the second quarter, underlining the soft recovery. [ID:nN10131732]
As well, China reported much slower than expected growth in July imports, signaling slowing domestic demand. [ID:nTOE67904G]
In Canada, data showed housing starts fell in July for a third straight month and new home prices rose less than expected in June, suggesting that the housing boom is stalled. [ID:nN10156666]
"All of that is still leaving a dark cloud over the market," Pepin said.
In individual company news, BlackBerry maker Research In Motion RIM.TO, up 1.7 percent at C$57.79, has agreed to hand over some coveted codes to users' phones to try to avert a ban on its Messenger service in Saudi Arabia, an industry source familiar with the talks told Reuters on Tuesday. [ID:nN09103593]
Shares of Maple Leaf Foods (MFI.TO) rallied 4.9 percent to C$9.44 after the Ontario Teachers' Pension Plan, the company's largest stakeholder, said it was selling about 11 percent but will hold on to its remaining stake for now. [ID:nN10199032]
$1=$1.03 Canadian Reporting by Jennifer Kwan; editing by Peter Galloway