Updated from 4:01 p.m. EDT

Stocks closed marginally higher Friday after a surge in oil prices put the kibosh on the early strength created by

Dell's

(DELL) - Get Report

earnings and a benign inflation report.

The

Dow Jones Industrial Average

gained 10.76 points, or 0.11%, to 9825.35; the

S&P 500

added 1.57 points, or 0.15%, to 1064.80; while the beaten-down

Nasdaq Composite

was up 4.73 points, or 0.27%, to 1757.22. The 10-year Treasury note traded up 6/32, yielding 4.22%, while the dollar was lower against the yen and euro.

Volume was light with just under 1.1 billion shares changing hands on the

New York Stock Exchange

, where advancers beat decliners by roughly a 5-to-4 majority. The Nasdaq had volume of 1.2 billion with decliners ahead of advancers by about 5 to 4.

Despite two production increases from the Organization of Petroleum Exporting Countries, oil prices climbed higher today on concerns of Iraqi sabotage, civil unrest in Venezuela and the ongoing Yukos issues. In New York, crude futures for September delivery rose $1.10 to $46.60, a new all-time record.

Oil prices were also goosed by Hurricane Charley, which was making landfall on the western coast of Florida just after trading closed. The category four storm slammed ashore about 20 miles north of Fort Meyers, Fla., packing winds of up to 140 mph. Catastrophe modeling forecasters said the hurricane could potentially do $10 billion in damage in a worst-case scenario, an estimate that led to selling in stocks like

Hartford

(HIG) - Get Report

and

Allstate

(ALL) - Get Report

.

On the economic front, the government said wholesale prices increased less than expected in July. The producer price index rose by 0.1%, matching the increase in the closely watched core index, which excludes food and energy prices. Economists were expecting the index to rise by 0.2%, after a dip of 0.3% in June.

Separately, the U.S. trade deficit came in higher than expected in July, according to the Commerce Department, at $58.8 billion, up from a revised $46.8 billion in June. Economists were expecting it to grow slightly to $47 billion.

"The Dell news was good news but unfortunately the murky economic data, especially the whopping trade deficit, certainly took the starch out of what may been a potentially strong rally," said Peter Cardillo, chief market analyst at S.W. Bach and Co.

"Unfortunately, the effects of higher oil prices certainly showed up in the trade deficit and that means that higher oil prices are cutting into economic activity," he added. "The high price of oil, which continues to get even more expensive, is basically spooking the market and continues to hold investors hostage."

Also, more disappointing news about consumers came when the University of Michigan released a preliminary reading of its consumer sentiment index for August, showing an unexpected decline to 94 after economists had expected it to rise to 97.5 from the 96.7 recorded in July.

After losing ground in tandem for the last five out of six weeks in a row, the major averages ended the week with the Dow up 0.1%, the S&P flat and the Nasdaq down 1.1%.

Stocks started Friday's session from their lowest levels of 2004, having fallen sharply Thursday amid surging oil prices and an earnings warning from

Hewlett-Packard

(HPQ) - Get Report

. The Dow dropped 124 points, or 1.2%, to 9815, while the Nasdaq tumbled 30 points, or 1.7%, to 1752.

On the geopolitical front, Iraq's radical Shiite cleric Muqtada al-Sadr, who has emerged as a figurehead of some of the strongest insurgencies against the U.S.-led coalition, was reportedly negotiating to end the violent confrontations that have plagued the Shiite holy city of Najaf for the past nine days, according to the

Associated Press

. Also, mass protests against the U.S. assault on Najaf broke out in five Iraqi cities, with some demonstrators calling for interim Prime Minister Iyad Allawi to step down.

Dell said late Thursday that second-quarter earnings rose 29% from a year ago to $799 million, or 31 cents a share, while revenue jumped 20% to $11.71 billion. Both lines matched Wall Street forecasts, and the company guided its third quarter in line. The computer retailer cited a 31% jump in overseas server shipments, touting strength in a business line that was the source of a painful earnings miss earlier Thursday by Hewlett-Packard.

Dell closed up $1.39 cents, or 4.2%, to $34.51. Microprocessor giant

Intel

(INTC) - Get Report

added 6 cents, or 0.3%, to $21.30.

Wall Street was abuzz with more chatter about the increasingly controversial IPO of the Internet-search icon,

Google

, whose Dutch auction began Friday. The latest flap involves an interview given by the company's founders in April to

Playboy

magazine. Federal regulators scrutinizing are expected to allow the IPO to move forward after forcing Google founders Larry Page and Sergey Brin disclose to potential investors that they may have violated securities laws.

Elsewhere, shares of

Cisco

(CSCO) - Get Report

were upgraded to overweight from equal weight at Morgan Stanley. The brokerage said Cisco is probably inexpensive after the selloff that greeted its disappointing second-half guidance Wednesday. Cisco closed up 7 cents, or 0.4%, to $17.86.

Network storage vendor

Brocade

(BRCD)

said after the bell Thursday that third-quarter earnings should be 6 cents or 7 cents a share, or 5 cents or 6 cents a share excluding items. On the latter basis, analysts had been expecting earnings of 4 cents a share. The stock closed up 78 cents, or 19.3%, to $4.82.

Analog Devices

(ADI) - Get Report

was down about 5% ahead of the bell after reporting third-quarter earnings of $169 million, or 43 cents a share, up from $79 million, or 21 cents a share, last year. Revenue rose 38% from a year ago to $718 million. Analysts were looking for earnings of 45 cents a share on revenue of $739 million. The stock was down 26 cents, or 0.8%, to $33.57.

Overseas markets were mostly lower after Thursday's slide on the Dow and Nasdaq. In London, the FTSE 100 was recently down 0.6% to 4302, while Germany's Xetra DAX was falling 0.3% to 3647. In Asia, Japan's Nikkei skidded 2.5% overnight to 10,757, while Hong Kong's Hang Seng dipped 0.5% to 12,360.

Before Monday's open, second quarter earnings are due out from

Lowe's

(LOW) - Get Report

, expected to have profits of 91 cents a share, up from 75 cents in the same period last year; and

Sysco

(SYY) - Get Report

, expected to report fourth quarter losses of 4 cents a share, down from 37 cents a share in the prior year.

After the bell, earnings are due out from

Mantech

(MANT) - Get Report

.

Kmart

(KMRT)

, is expected to report earnings of 14 cents a share, up from a loss of 5 cents a share last year. The time was unspecified.

No major economic releases were scheduled for Monday.