* Stocks end lower but cut losses after Fed
* Fed to buy more long-term Treasuries
* Dollar loses safe-haven appeal after Fed signals
* Signs of slowing growth in China weigh on commodities (Updates with closing prices)
By Manuela Badawy and Al Yoon
NEW YORK, Aug 10 (Reuters) - U.S. stocks lost ground but finished the day well off earlier lows and government debt rallied on Tuesday after the Federal Reserve signaled it would act as necessary to preserve the fading economic recovery.
The dollar lost luster as a haven from risk declining against the yen, while crude oil prices trimmed losses.
The Fed said it would begin funneling proceeds from its maturing mortgage bonds into longer-term government debt in an effort to support a sputtering economic recovery.
The move marks an important policy shift for the Fed, which just months ago had been debating how to start winding up its various monetary stimulus programs. Fed officials also offered a gloomier outlook on the U.S. economy.
Strategists noted that reinvestment of mortgage proceeds into long-dated Treasuries stops well short of more aggressive, outright purchases of government or mortgage debt.
The U.S. central bank, which left benchmark overnight interest rates steady in a range of zero to 0.25 percent, also renewed its pledge to keep rates low for an extended period, as widely expected.
The stock market's lukewarm response suggested investors didn't believe the actions would have much immediate impact on the weak labor market and consumer sector, two of the biggest headwinds facing the recovery.
"The Fed is kind of caught in a spot where it isn't sure what to do, so it went halfway," said Michael O'Rourke, chief market strategist at BTIG LLC in New York. "This is an insurance move, one it probably took grudgingly just to meet market expectations."
Stocks and commodity prices earlier had slumped ahead of the Fed's meeting and after a report of weak Chinese imports triggered concern of slowing growth in China, which has been an engine of growth for the world economy.
The Dow Jones industrial average <.DJI> ended down 54.50 points, or 0.51 percent, at 10,644.25. The Standard & Poor's 500 Index <.SPX> fell 6.73 points, or 0.60 percent, at 1,121.06. The Nasdaq Composite Index <.IXIC> closed lower 28.52 points, or 1.24 percent, at 2,277.17.
The S&P rebounded back above its 200-day moving average. All three major indexes had been down more than 1 percent before the Fed's decision and on evidence that China's rapid growth was easing.
The S&P materials index <.GSPM> ended down 1.0 percent and the energy index <.GSPE> was off 0.8 percent.
In currency markets, the Fed's announcement weighed on the dollar.
The downgrade to the economic outlook "is a problem for the dollar in general," said Brian Dolan, chief strategist at Forex.com in Bedminster, New Jersey, while the move to invest in long-dated Treasury debt has pushed down U.S. bond yields, making the dollar less attractive to global investors.
The euro was down 0.39 percent at $1.3181
FED MOVE STOKES BID FOR BONDS
U.S. Treasuries prices rallied, extending earlier gains, after the Federal Reserve said it will deploy principal payments from its mortgage holdings to buy long-dated government debt.
The price on the 30-year U.S. government bond
The benchmark 10-year U.S. Treasury note
U.S. crude oil futures ended with pared losses after the Fed's pledge to maintain its policy of low interest rates for an extended period.
On the New York Mercantile Exchange, September crude
Oil prices were stung by a slowdown in oil imports by China, the world's second largest energy consumer, which underlined investors' fears that the global economic recovery is losing momentum.[ID:nTOE67904G]
Although China's trade surplus surged in July to an 18-month high as exports rose, a government-induced slowdown in investment took a toll on imports.
"China is certainly the global growth engine for almost all parts of the world, especially to the United States. Their macro data is influencing the psychology of investors of all assets here," said Craig Peckham, equity trading strategist at Jefferies & Co in New York.
World stocks measured by the MSCI All-Country World Index <.MIWD00000PUS> dropped 1.2 percent, and the Thomson Reuters global stock index <.TRXFLDGLPU> fell 1.2 percent.
The MSCI emerging markets benchmark <.MSCIEF> was down 1.18, with China's Shanghai Composite Index down 3 percent after data showed Chinese import growth below expectations, pointing to slowing domestic demand and economic activity.
In Europe, the FTSEurofirst 300<.FTEU3> index closed 0.9 percent lower ahead of the Fed's policy statement, with miners falling heavily. (Additional reporting by Chris Reese, Angela Moon and Wanfeng Zhou; Editing by Leslie Adler)