A late rally Friday prevented the stock market from having its worst week in nearly a year.
Investors seemed to largely ignore the ongoing debate in Washington over raising the countrys borrowing limit. Troubling questions over Europes financial health and manufacturing in the U.S. weighed down stock prices for much of the day, overwhelming a very strong earnings report from Google Inc.
Google jumped nearly 13 percent, the most of any stock in the Standard and Poors 500 index, after the company said its revenue hit a record last quarter. Googles earnings pushed tech stocks in the S&P index broadly higher. Microsoft Corp. and Cisco Systems Inc. each gained 1 percent.
Most investors believe a deal to raise the countrys debt ceiling will be reached before the Aug. 2 deadline. Standard & Poors said Thursday there is a 50 percent chance it will downgrade the governments triple-A rating within three months because of the impasse. Moodys made a similar warning on Wednesday. Even so, there has been little visible progress in negotiations between President Barack Obama and Congressional Republicans.
The Standard and Poors 500 stock index finished with a gain of 7.27, or 0.6 percent, to 1,316.14. Most of the gains came in the last hour of trading.
The Dow Jones industrial average added 42.61, or 0.3 percent, to 12,479.73. The Nasdaq composite rose 27.13, or 1 percent, to 2,789.80.
The late gains Friday trimmed the S&P 500s weekly losses to 2.1 percent. Had the index closed where it was at 2:30 p.m., it would have been down 2.6 percent for the week.
The S&P 500 has only had two up days out of the last six as Italy appeared to be the next European country headed for a fiscal calamity. Those concerns ebbed Friday after Italy passed new austerity measures and Europes banking authority said only eight banks out of 90 failed the latest round of stress tests designed to measure how they would stand up under severe financial strains.
Energy stocks rose 2.4 percent after Australian natural-resource giant BHP Billiton Ltd. said it would buy Petrohawk Energy Corp. for $12.1 billion, feeding speculation about which company might be the next takeover target. BHP was attracted to the long-term value of Petrohawks U.S. natural gas reserves. Chesapeake Energy Corp., Cabot Oil & Gas Corp and Pioneer Natural Resources Co. each rose 10 percent. Natural gas prices rose 3.7 percent.
Mattel Inc. rose nearly 2 percent after the company said its income jumped 56 percent in the second quarter, helped by strong demand for Barbie and Cars 2 toys. Clorox Co. jumped 9 percent after billionaire investor Carl Icahn offered to take the company private in a deal that values the household products company at $10.2 billion. Icahn offered 12 percent more for shares than they were worth at Thursdays close.
Bank of America closed at $10 after briefly dipping below that mark for the first time since May 2009. The company, which is expected to report Tuesday that it lost money in its most recent quarter.
Three stocks rose for every two that fell on the New York Stock Exchange. Volume was slightly higher than average at 4 billion shares.
The Dow average fell 1.4 percent for the week, the Nasdaq 2.4 percent.