Stocks scored their first back-to-back weekly gains since early July on Friday, on strong Google earnings and as investors kept riding waves of optimism for a solution to the euro-zone debt crisis.

The Dow Jones industrial average <.DJI> gained 166.36 points, or 1.45 percent, to end unofficially at 11,644.49. The Standard & Poor's 500 Index <.SPX> rose 20.92 points, or 1.74 percent, to finish at 1,224.58. The Nasdaq Composite Index <.IXIC> advanced 47.61 points, or 1.82 percent, to close unofficially at 2,667.85.

For the week, the Dow unofficially gained 4.9 percent, while the S&P 500 jumped 6 percent and the Nasdaq shot up 7.6 percent.

(Reporting by Edward Krudy; Editing by Jan Paschal)