Stocks rose Friday as oil prices stabilized following a recent jump. The escalating turmoil in Libya still left major indexes down about 2 percent for the week.
Oil prices settled at $97.88, down from a high of $103 Thursday but still up 13 percent over the last week. Oil prices have been rising, sending stocks lower, as concerns rose that violence would spread throughout North Africa and the Middle East, affecting oil production for big OPEC producers like Iran and Saudi Arabia.
Those concerns eased late Thursday after the International Energy Agency said the impact was far less than analysts had estimated and that any shortfall could be easily made up by tapping oil reserves in other countries.
Boeing Co. rose 2.2 percent after the Air Force awarded the company a $35 billion contract Thursday, one of the largest ever made by the military, for nearly 200 airborne refueling tankers.
DreamWorks Animation SKG Inc. fell 2.8 percent after the entertainment company reported revenue and earnings that were far below what analysts were expecting. Poor box office results from the Will Ferrell movie "Megamind" were partly to blame.
The Dow Jones industrial average rose 61.95, or 0.5 percent, to close at 12,130.45. It was the first rise for the Dow after three days of losses.
The Standard & Poor's 500 index rose 13.78, or 1.1 percent, to 1,319.88. The Nasdaq composite rose 43.15, or 1.6 percent, to 2,781.05
All three indexes are still down for the week, largely a result of the fighting in Libya.
Libya is Africa's largest producer of oil but only ranks 15th among the world's oil exporters. Traders have been concerned that fighting could not only threaten Libya's oil production but also spread to other countries in the region such as Saudi Arabia.
Higher oil prices also weigh on the U.S. economy by increasing the costs of moving goods and filling up gas tanks. A sustained $10 increase in the price of oil translates into a 0.2 percent cut in economic growth over 12 months, according to a recent estimate by economists at Goldman Sachs.
Treasurys inched up Friday on reports the economy grew more slowly than first thought in the last three months of 2010. The yield on the 10-year Treasury note edged down to 3.42 percent from 3.46 percent late Thursday.
The Commerce Department said the economy expanded at an annual rate of 2.8 percent in the October-December quarter. That's weaker than the previous estimate of 3.2 percent. In an attempt to close budget gaps, state and local governments have cut spending much more deeply than previously thought.
Despite this week's slide, the S&P 500 is up 2.6 percent in February and 4.9 percent for the year. Stronger earnings from a wide range of companies, including Archer Daniels Midland Co. and Dell Inc., have helped drive stocks higher.
Five stocks rose for every one that fell on the New York Stock Exchange. Consolidated volume was 3.9 billion shares.