Updated

U.S. stocks fell Wednesday, wiping out the year's gains for the benchmark S&P 500, after Countrywide Financial (CFC) shares plunged on a brokerage downgrade and rumors it was having trouble raising money.

The Dow Jones industrial average lost 167.45 points, or 1.29 percent, to end at 12,861.47 — or 8.4 percent below its record close. Wednesday marked the Dow's first close below 13,000 since April 24.

The clouds enveloping the No. 1 U.S. mortgage lender, which had its biggest one-day percentage drop since 1987 and ranked among the biggest losers on the New York Stock Exchange, exacerbated concerns about the health of the mortgage lending business and its effect on wider credit markets.

After a fleeting rally, financial shares helped push the market sharply lower in the the last hour of trading. Energy companies' stocks also dropped after striking early gains.

Shares of Countrywide fell 13 percent to close at $21.29 on rumors it was having difficulty raising money in the commerial paper market. Countrywide officials were not immediately available for comment.

Earlier, Merrill Lynch (MER) recommended its clients sell Countrywide stock, saying the mortgage lender could face bankruptcy if liquidity worsens. Countrywide's stock sank to a session low at $19.25 — a drop of 21.3 percent for the day.

"The liquidity crisis is now spilling over into the commercial paper market and that has impacted Countrywide today," said Craig Hester, chief executive officer of Hester Capital Management, in Austin, Texas.

"The fear is that this problem that originated in subprime is like a growing cancer. The uncertainty of not knowing where the next problem is going to emerge is just too much for investors to handle."

The Standard & Poor's 500 Index fell 19.84 points, or 1.39 percent, to finish at 1,406.70. The S&P is now 9.43 percent below its record high close and down 0.82 percent for the year. The Nasdaq Composite Index dropped 40.29 points, or 1.61 percent, to close at 2,458.83.

Financial shares led an early rally, which analysts and traders attributed to reverse bets that the market would fall and bargain hunters picking up beaten-down shares.

But the gains were quickly shot down by fresh negative headlines and by the end of the session, the investment banking and brokerage sector was dragging on the S&P 500.

Lehman Brothers' shares fell 3.9 percent to $51.57, and Merrill Lynch declined 3.4 percent to $68.94. An index of broker dealers' shares was down 2.3 percent.

Exxon Mobil (XOM) fell 1.7 percent to $81.69, reversing earlier gains, and helped lead the S&P 500 lower. The S&P energy index was down 2.2 percent.

Shares of Applied Materials Inc. (AMAT), the world's top supplier of equipment used to make semiconductors, fell 4.1 percent to $20.36, after it posted a lower quarterly profit late Tuesday and said new orders for the third quarter decreased 14 percent.

The Dow Jones index of home builders' shares was down 4.8 percent after the National Association of Home Builders said its gauge of U.S. home builder sentiment slid in August to its lowest level since January 1991.

The market drew some strength from economic data earlier in the session. Falling gasoline costs held U.S. consumer prices nearly in check in July and industrial output rose, according to data that suggested the economy was sound despite credit fears in financial markets.