A month-long rally on Wall Street appears to be sputtering as stocks slipped on Thursday in what investors called a possible warning of weakness ahead.

Weaker-than-expected home sales figures and a group of mixed earnings reports tempered the market's recent buying interest.

With the S&P 500 up nearly 5 percent for the year, analysts said the market was due for a pullback. Wall Street has advanced in recent weeks as U.S. data raised expectations the economic recovery was picking up steam.

This market is tired and overbought, and we're seeing the results of that today, said Larry McMillan, president of McMillan Analysis Corp.

After yet another knee-jerk rally on moderately positive economic news, the buyers are out of gas, McMillan said.

Stocks began higher, helped by the Federal Reserve's vow on Wednesday to keep interest rates near zero at least until the end of 2014, a support for buying of risky assets.

But gains were short-lived and the market turned lower in the morning. The Dow's losses were limited by Caterpillar Inc , which rose 2.1 percent to $111.31. The heavy equipment maker posted a jump in quarterly earnings that far exceeded Wall Street expectations.

Housing-related stocks led the reversal after sales of new single-family homes fell for the first time in four months in December. It followed Wednesday's soft pending home sales report and dented optimism that housing may have reached a bottom.

Toll Brothers Inc lost 5 percent to $22.07. The PHLX housing sector index <.HGX> declined 1.3 percent.

Banks, which stand to benefit from a recovery in housing, also fell. The KBW Bank index <.BKX> dropped 2.2 percent. SunTrust Banks Inc shed 5.2 percent to $20.50 after Deutsche Bank lowered its rating on the stock.

AT&T Inc posted a $6.7 billion quarterly loss, in part on a break-up fee for its failed T-Mobile USA merger. The shares fell 2.5 percent to $29.45 and were the primary reason the telecom sector was the worst of the S&P's 10 sectors.

The Dow Jones industrial average <.DJI> was down 22.33 points, or 0.18 percent, at 12,734.63. The Standard & Poor's 500 Index <.SPX> was down 7.60 points, or 0.57 percent, at 1,318.45. The Nasdaq Composite Index <.IXIC> was down 13.03 points, or 0.46 percent, at 2,805.28.

Stocks also rose early after data showed orders for durable manufactured goods rose more than expected in December, while unemployment benefit claims last week rose only moderately.

3M Co , a conglomerate with operations throughout the economy, also supported the Dow after it reported higher-than-expected quarterly earnings as demand from industrial and transport markets offset weak sales to makers of consumer electronics. The shares rose 1.2 percent to $87.58.

This is one of the busiest weeks of earnings season, with 117 S&P companies expected to report. According to Thomson Reuters data, 59 percent of the 152 companies in the S&P 500 that have reported earnings beat analysts' forecasts, down from the 70 percent beat rate in recent quarters at this stage.

Amgen Inc's shares fell 1.6 percent to $68.08 and weighed on the Nasdaq after the world's largest biotechnology company said it would pay more than $1 billion to buy Micromet Inc , a deal that would give it access to the company's novel cancer treatment technology.

Micromet's shares jumped 32.1 percent to $10.94 and were the most heavily traded on Nasdaq.

About 7.9 billion shares exchanged hands on the New York Stock Exchange, NYSE Amex and Nasdaq on Thursday.

(Reporting By Angela Moon; additional reporting by Doris Frankel; Editing by Kenneth Barry)