Updated from 4:04 p.m. EDT

Stocks posted solid gains Friday as oil prices retreated, with the major indices closing higher for the fifth time in six sessions.

The

Dow Jones Industrial Average

added 69.32 points, or 0.69%, to 10,110.14, its highest close since Aug. 4; the

S&P 500

added 7.12 points, or 0.65%, to 1098.35; and the

Nasdaq Composite

was up 18.12 points, or 1%, to 1838.01.

For the week, the Dow added 285 points, or 2.9%, while the S&P 500 rose 33 points, or 3.1%. Both indices had their second consecutive weekly gain. The Nasdaq rose 81 points, or 4.6%, posting its first weekly gain in a month.

In other trading, the 10-year Treasury note lost 3/32 in price to yield 4.23%, while the dollar fell.

Volume was light at the

New York Stock Exchange

with 1.1 billion shares trading and advancers beating decliners by roughly 7 to 2. On the Nasdaq, 1.3 billion shares were traded, and advancers beat out decliners 7 to 3.

In New York, Nymex crude for September delivery ended 84 cents lower at $47.86, breaking the upward march that has carried oil higher to record highs on almost every day this month. Prices broke $49 a barrel for the first time earlier. While concern lingered regarding U.S. military action in the Iraqi city of Najaf, the September contract also was volatile because of its expiration, which occurred Friday.

The October contract, the new benchmark, closed 99 cents lower at $46.65.

"The news out of Iraq with al-Sadr possibly coming to some agreement gave investors some positive news to focus on," said Robert Pavlik, portfolio manager for Oaktree Asset Management. "I also think that people are looking at us getting into a bit of an oversold position, and that leads to some short-covering.

"People are looking for what positives they can," he said. "There's a lot of cash and a lot funds that need to be put to work in the market, but a more prudent approach would be to use this short-term rally to lighten up on the stocks that you don't want to own."

On the political front, tensions were high as Iraqi Prime Minister Ayad Allawi gave rebel cleric Moqtada al-Sadr what he defined as a final warning to disarm and leave the shrine in Najaf that has been both a refuge and a staging ground for the rebel insurgency. According to media reports, the showdown appeared on the verge of a nonviolent conclusion Friday, after the cleric agreed to a cease-fire and the disarmament of his followers on Wednesday.

The markets have watched the standoff in Najaf closely, as heavily Shiite southern Iraq is a major export point for Iraqi oil. A nonviolent end to the standoff would be a significant victory for the government and ease investors' concerns about civil unrest.

Steve Kolano, assistant vice president of international equity trading with Boston Company Asset Management, said the market's attention is once again fixed on the price of oil.

"We've been stuck in the pattern here over the last few weeks, with oil just continuing to rise," Kolano said. "People are just trying to figure out what's going to happen with this situation. Will the government tap the oil reserve? Will the prices come down? Nobody knows.

"Oil prices at these levels have a strong effect on people's spending habits and the economy as a whole," he added. "I think it's impressive that the market is holding where it is here, because everyone's waiting to see if companies are going to have to lower their earnings outlooks if oil stays this high."

Among stocks in focus was

Gap

(GPS) - Get Report

, which said after the bell Thursday that second-quarter earnings fell 7% to $194 million, or 21 cents a share, matching analyst estimates. The retail chain told analysts to lower their forecasts earlier in the month, blaming unsuccessful discounts and weak traffic. The stock added 47 cents, or 2.2%, to $20.62.

A report that auto dealers trying to sell

General Motors

(GM) - Get Report

cars are overloaded with inventory also added a note of caution. Apparently, car buyers have been proceeding with caution in GM showrooms this summer, despite incentives that go as high as $6,000 on some cars.

The Wall Street Journal

says the automaker's inventory levels are currently about 10% above normal, resulting in production cutbacks and further discounts. GM executives told the paper that they consider the situation "a challenge" that is not unmanageable. The shares fell 21 cents, or 0.5%, to $41.33.

Google's

(GOOG) - Get Report

IPO continued to garner attention on Wall Street after the stock jumped 18% to a Thursday close of $100.34 after pricing at $85 Wednesday night. On Friday, independent brokerage Jefferies started the shares with a buy rating and set a $115 fair-value target. Jefferies cited recent market-share gains, the company's flush bank account and strong brand for the bullish call.

Google was shot up $7.98, or 8%, to $108.31.

Overseas stocks were mixed, with London's FTSE 100 recently trading up 0.1% to 4366 and Germany's Xetra DAX falling 0.2% to 3714. In Asia, Japan's Nikkei fell 0.1% overnight to 10,889, while Hong Kong's Hang Seng dipped 0.2% to 12,377.

Next week, earnings are due out from

Toys R Us

(TOY)

,

H.J. Heinz

(HNZ)

and

Hughes Supply

(HUG)

.

Next week, investors will be watching Wednesday for the government to release the figure for July's durable orders, as well as new home sales for the month. Later in the week, the commerce department will release the preliminary second quarter GDP estimated to show growth of 2.8%.