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

The Dow Jones industrial average <.DJI> gained 165.37 points, or 1.66 percent, to 10,151.18. The Standard & Poor's 500 Index <.SPX> rose 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.

(Reporting by Chuck Mikolajczak; Editing by Kenneth Barry)