Wall Street closed out a difficult week with a mixed finish Friday after the Federal Reserve injected billions of dollars into the banking system to calm markets torn by worries about evaporating credit. The Dow Jones industrials, down more than 200 points during the session, ended with just a 31-point deficit and managed to post a gain for the week.

The Dow Jones industrial average was down 31.14 points, or 0.23%, to end at 13,239.54 (up .44% from last Friday's close of 13,181.91), after earlier falling more than 200 points to a session low at 13,057.86. The Standard & Poor's 500 Index was up 0.55 of a point, or 0.04%, to finish unofficially at 1,453.64, off its session low at 1,429.74. The Nasdaq Composite Index was down 11.60 points, or 0.45%, to close unofficially at 2,544.89. Earlier, the Nasdaq fell as low as 2,503.16.

Friday's moves were typical of the zigzag trading and triple-digit moves in the Dow since the index closed at a record 14,000.41 on July 19. The Dow is down about 761 points, or 5.4 percent, from its record close.

Broader stock indicators finished mixed. The Standard & Poor's 500 index edged up 0.55, or 0.04 percent, to 1,453.64, and the Nasdaq composite index fell 11.60, or 0.45 percent, to 2,544.89.

All three indexes still finished higher for the week: The Dow rose 0.44 percent, the S&P advanced 1.44 percent and the Nasdaq added 1.34 percent. Sharp gains Monday, such as the Dow's 287-point climb, left stocks better able to weather Thursday's plunge.

The stock market, which has been gyrating for weeks over fears that credit is drying up, pared its losses after the Fed's injections of cash and following morning comments from the central bank that it would do all it can to "facilitate the orderly functioning of financial markets." The steep declines seen at times during the session and persistant volatility, however, showed the depths of fear.

The Fed added $19 billion in liquidity to the market Friday morning, then another $16 billion and, finally, $3 billion.

Federal Reserve policy makers "are trying to do everything they can short of cutting the federal funds rate" to try to calm the markets, said Ed Yardeni, president of Yardeni Research in Great Neck, N.Y.

The New York Fed, which carries out the central bank's market operation, announced a three-day repurchase agreement of mortgage backed securities and then two more of the so-called "repo" moves to inject liquidity into the market. The Fed's maneuvers came after the fed funds rate, the amount banks charge each other for overnight loans, ticked above 6 percent again Friday — well above the Fed's target of 5.25 percent and a sign that credit was becoming harder to obtain.

The Fed stepped in after the same occurrence Thursday, injecting $24 billion in temporary reserves to the U.S. banking system. In a repo, the Fed arranges to buy securities from dealers, who then deposit the money the Fed has paid them into commercial banks.

"It's encouraging because it's a proactive step and they're not just focused on the inflation numbers and not ignoring turmoil in the credit market," said John Miller, head of the fixed income funds at Nuveen Asset Management.

The Fed's moves Thursday and Friday follow its August meeting Tuesday at which it left short-term interest rates unchanged, as it has done for more than a year. In its statement following the meeting, the bank said its primary concern remains inflation.

But the tumultuousness of the final two sessions of the week, which followed a sharp run-up in the week's first three sessions, has some market observers wondering whether the Fed will need to take added steps to douse some of the credit fears that have gripped the markets.

"I think it's premature to forecast a recession, particularly if the Fed is responsive. There is no reason why we couldn't work our way out of this fairly quickly," said Miller.

However, he contends subprime unease is likely to continue, particularly this fall as a big batch of subprime mortgages written in 2005 and 2006 begin to reset their rates.

Part of the unease over subprime loans — those made to borrowers with weak credit — relates to a process known as securitization. Investors bundle together mortgages, including some subprime loans, and sell them off to institutional investors such as hedge funds and mutual funds. These buyers are hoping for the steady flow of income from homeowners making their mortgage payments. The result is that many big investors are finding it difficult to sift through their holdings and take stock of all potential subprime loans that could go bad.

Such loans sour when borrowers with poor credit find themselves unable to make their mortgage payments now that home values aren't rising as fast or even falling in much of the country.

Investor confidence worldwide has been shaken by the credit market problems. In Asia, stocks fell Friday after regulators including the Bank of Japan added liquidity. The European Central Bank for the second day added cash to its money markets.

These banks and others around the world haven't worked together to inject liquidity into the markets since the aftermath of the Sept. 11, 2001, attacks. But the measures, intended to keep financial markets well-oiled, also seemed to confirm fears of a larger problem in the credit markets that will stall corporate growth — including the burst of takeover activity that powered stocks higher this year.

Overseas, Japan's Nikkei stock average fell 2.4 percent. Hong Kong's Hang Seng Index fell 2.9 percent. Britain's FTSE 100 fell 3.71 percent, Germany's DAX index finished down 1.48 percent, and France's CAC-40 fell 3.13 percent.

The yield on the benchmark 10-year Treasury note rose to 4.80 percent from 4.79 percent late Thursday. The dollar was mixed against other major currencies, while gold prices rose.

Light, sweet crude fell 12 cents to $71.47 per barrel on the New York Mercantile Exchange.

Declining issues outnumbered advancers by more than 5 to 3 on the New York Stock Exchange, where volume came to 2.53 billion shares compared with a heavy 2.8 billion shares traded Thursday.

The Russell 2000 index of smaller companies rose 3.91, or 0.50 percent, to 788.78.