Stocks rebounded to post their best gains in nearly four weeks on Friday, overcoming initial skittishness brought on by a revenue warning from Intel and dour comments from Federal Reserve Chairman Ben Bernanke.

Strong buying interest at a key technical level and short-covering sparked the market's comeback, and the tone improved as investors took a more positive view of Bernanke's comments about the economy and the Fed's readiness to act.

Bernanke told central bankers at a conference in Jackson Hole, Wyoming the recovery has weakened more than expected but the U.S. central bank was ready to take further steps if needed to spur the recovery.

The Fed chairman downplayed concerns that the economy might slip back into recession, reassuring investors spooked by his recent comments the U.S. economy faced unusual uncertainty.

Bernanke struck the right tone to say, 'We know things have been weaker than expected, but we still think we're going to get through this,' said Scott Marcouiller, chief technical market strategist at Wells Fargo Advisors in St. Louis.

Intel Corp briefly helped take indexes lower after the chipmaker warned third-quarter revenue could fall short of its own estimates by more than $1 billion. But its shares finished up 1.1 percent at $18.37 after losing more than 15 percent since late July.

Shares in Intel were halted twice, once pending news and once after the stock triggered a circuit breaker.

Even though the news is bad, the bad news is already in the valuation. Obviously business isn't going great there, but the stock is so cheap this doesn't matter, said Stephen Massocca, managing director at Wedbush Morgan in San Francisco.

The Dow Jones industrial average <.DJI> gained 164.84 points, or 1.65 percent, to 10,150.65. The Standard & Poor's 500 Index <.SPX> jumped 17.37 points, or 1.66 percent, to 1,064.59. The Nasdaq Composite Index <.IXIC> climbed 34.94 points, or 1.65 percent, to 2,153.63.

Nonetheless, the Dow and S&P 500 racked up their third week of declines in a row. For the week, the Dow was down 0.6 percent, the S&P lost 0.7 percent, while the Nasdaq gave up 1.2 percent.

The stock market started on a positive note after U.S. economic growth was revised down in the second quarter, but still the reading was better than expected. The debate over whether the economic recovery has hit a soft patch or is headed for a double-dip recession has plagued the market.

Although the data pointed to an even softer performance in the third quarter, investors were relieved that the reading was not as bad as feared.

Coming into the day, expectations were it could be a miserable day. It didn't happen, so I have to think there was huge short-covering behind this rally, Marcouiller said.

Stocks that benefit from a strong economy were among the day's winners, with Caterpillar Inc and Boeing lifting the Dow. Caterpillar rose 3 percent to $65.90 and Boeing gained 3 percent to $63.16.

Shares of 3PAR Inc
surged 24.7 percent to $32.46 after Hewlett-Packard Co again raised its buyout offer for the data storage company, leapfrogging a bid from Dell Inc . HP, a Dow component, dipped 0.6 percent to $38, while Dell rose 1.2 percent to $11.89.

Energy and materials shares also led the way up as the price of oil rose more than 2 percent over $75 a barrel. The S&P energy group <.GSPE> jumped 2.8 percent and Chevron gained 2.2 percent to $74.93.

About 7.99 billion shares traded on the New York Stock Exchange, the American Stock Exchange and Nasdaq, below last year's estimated daily average of 9.65 billion.

Advancing stocks handily outnumbered declining ones on the NYSE by 2,608 to 392, while on the Nasdaq, advancers beat decliners 2,165 to 470.

(Reporting by Leah Schnurr; Editing by Kenneth Barry)