The market, which just a week earlier withstood a terrible November employment report, managed its advance after the Treasury Department said it was prepared to assist the nation's Big Three automakers. The Dow Jones industrial average had fallen more than 200 points in very early trading when it appeared that the Senate had killed a $14 billion bailout package for the companies.
"It's hard to say if this is indeed the beginning of a recovery, but it could be," said Matt King, chief investment officer of Bell Investment Advisors. "It seems like the past few Fridays we've ended the week on a positive note."
A week ago, the market shook off the Labor Department's report that the economy lost a larger than expected 533,000 jobs in November. Investors are showing a greater tolerance for bad economic and corporate news, and many analysts believe that the market may have reached a bottom after the horrific selling of the past three months.
Since its Nov. 20 low, the Dow is up 14.3 percent, the Standard & Poor's 500 is up 16.9 percent and the Nasdaq composite index has a gain of 17.1 percent.
Many analysts believe Wall Street is growing more confident that the government's steps to stimulate the economy, including its $700 billion bank bailout program, will work. And so news that the Treasury Department would help prevent bankruptcy filings and job losses in the auto industry helped turn the market around Friday.
General Motors Corp. and Chrysler LLC have said they could run out of cash within weeks without government help. Ford Motor Co., which would also be eligible for aid under the bill, has said it has enough cash to make it through next year.
Some of the market's moves Friday were with an eye toward next week's Federal Reserve decision on interest rates. The two-day meeting begins Monday; the Fed is widely expected to lower its key federal funds rate half a percentage point to 0.5 percent, another step by the government toward lifting the economy out of recession.
The Dow rose 64.59, or 0.75 percent, to 8,629.68. The Dow tumbled 196 points Thursday as worries intensified that the auto bill would stall in the Senate.
The S&P 500 index rose 6.14, or 0.70 percent, to 879.73, and the Nasdaq rose 32.84, or 2.18 percent, to 1,540.72.
For the week, the Dow ended with a loss of fewer than 6 points, or 0.07 percent. The S&P 500 rose 0.42 percent, while the Nasdaq advanced 2.08 percent because of Friday's gains.
The Russell 2000 index of smaller companies rose 17.22, or 3.82 percent, to 468.43 Friday.
Bond prices were mixed. The yield on the benchmark 10-year Treasury note, which moves opposite its price, fell to 2.58 percent from 2.63 percent late Thursday. The yield on the three-month T-bill was unchanged at 0.02 percent from late Thursday. The bill has been in great demand because of the safety it offers investors.
The dollar was mixed against other major currencies, while gold prices fell.
Light, sweet crude fell $1.70 to settle at $46.28 on the New York Mercantile Exchange.
The day's economic news showed continuing weakness, but, as it has done with a steady stream of downbeat data in recent weeks, the market shrugged.
The Labor Department said wholesale prices sank in November for the fourth straight month, raising deflation fears. The Producer Price Index fell a greater-than-expected 2.2 percent as prices for gasoline and other energy prices retreated. That followed a record 2.8 percent drop in October.
Businesses also slashed inventories in October by the largest amount in five years. The Commerce Department said businesses cut what was on shelves and back lots by 0.6 percent, triple the 0.2 percent decline economists expected.
Next week's readings include the Consumer Price Index and housing starts for November.
The week also brings quarterly results from Wall Street's brokerages, which have been badly hurt by the stock market's tumble from its October 2007 highs, the slowdown in the economy and the freeze-up in the credit markets.
GM ended down 18 cents, or 4.4 percent, at $3.94 after declining as much as 37 percent in the session. Ford rose 14 cents, or 4.8 percent, to $3.04. Chrysler isn't publicly traded.
But even a potential lifeline for Detroit couldn't ease all of the concerns about job losses. Bank of America Corp. said late Thursday it expected to cut as many as 35,000 jobs over the next three years, including some from investment bank Merrill Lynch & Co., which it agreed to buy in September. Bank of America rose 2 cents to $14.93.
Investors grappled with further prospects of diminished confidence in Wall Street. Late Thursday, Wall Street veteran Bernard L. Madoff was arrested on a securities fraud charge. Madoff, who 18 years ago was chairman of the Nasdaq stock market, was accused of running a phony investment business that lost at least $50 billion and that he called a "giant Ponzi scheme," prosecutors said.