US blue chips climbed for the fourth day in a row on Friday, but gains were capped by another surge in oil prices while economic reports cast doubt on the economy's strength.
Meanwhile, strong earnings from Gilead Sciences Inc helped push up the Nasdaq, after the biotechnology company reported a higher quarterly net profit on increased sales of its flagship HIV drug.
Investors were focused on the strength of the economy, after a slew of data hit the market - sending conflicting messages.
Oil prices also were uppermost in people's minds as US crude hit $43.85 - another record high.
The mixed messages in the news drove blue chips in and out of negative territory during the session.
"The market has been taking its cue from headlines as they go across on a tick-by-tick basis," said Jack Caffrey, equity strategist at JP Morgan Private Bank.
After they had "a chance to digest and dig" through some of the data, concerns grew about how strong the economy's rebound would be, he said.
By the close, the Dow Jones industrial average was up 10.47 points, or 0.10 percent, to end at 10,139.71. During the session, the Dow swung from a low of 10,086.32 to a high of 10,149.65. The Standard & Poor's 500 Index added 1.29 points, or 0.12 percent, to 1,101.72, based on the latest data. The technology-laced Nasdaq Composite Index gained 6.30 points, or 0.33 percent, to 1,887.36.
The Dow's biggest percentage gainers included Boeing Co, up $1.07 at $50.75, as well as Coca-Cola Co, up 80 cents, or 1.86 percent, at $43.86, and McDonald's Corp, up 26 cents, or 0.95 percent, at $27.50.
For the week, stocks rose. The blue-chip Dow average gained 1.8 percent during the week, while the broad S&P 500 index advanced 1.4 percent, and the Nasdaq rose 2.1 percent.
For July, though, it was a different story. Stocks fell. The Dow dropped 2.8 percent during July, while the S&P 500 shed 3.4 percent, and the Nasdaq declined 7.8 percent. The most closely watched economic data during Friday's session was a report on the US gross domestic product, showing growth slowed more than expected in the second quarter as consumers curbed their spending.
GDP, a measure of total output of goods and services within the nation's borders, rose during the second quarter at an annual rate of 3 percent - below the forecast for a gain of 3.6 percent and below an upwardly revised pace of 4.5 percent at the start of the year, the US Commerce Department said.
In contrast, another report showed the pace of expansion in business activity in the US Midwest increased more than expected in July, helping to confirm an optimistic economic outlook from the Federal Reserve. The National Association of Purchasing Management-Chicago said its index of Midwest business activity jumped to 64.7 in July from 56.4 in June. The forecast called for the index to rise to 59.0.
"The PMI reading looks better on a headline basis," said Caffrey.
"But when you start looking at some of the components, it is a little bit less robust. While it points to potential stabilisation, it doesn't point perhaps to the rebound we first thought about."
The NAPM-Chicago index's employment component fell to 45.6 in July from 53.6 in June, but the prices-paid index also declined to 77.6 in July from 84.5 in June; the new orders segment rose to 68.7 in July from 56.8 in June. Among the slew of economic reports out on Friday morning was one from the National Association of Purchasing Management-New York that showed New York's economy improved for the 11th straight month in July.
Also weighing on the market was news that suspected suicide bombers struck the US and Israeli embassies in Uzbekistan as well as the state prosecutor's office on Friday, killing two local guards at the Israeli mission and wounding nine other people.
Meanwhile, September oil futures in New York settled at $43.80 a barrel, up $1.05, after a midday jump to $43.85 - the highest level since the crude futures contract began trading on the New York Mercantile Exchange in 1983.
While positive for energy companies, higher oil prices are generally bad news for stocks overall as they push costs up for companies - causing concerns among investors about the impact on profits. ChevronTexaco Corp, the No 2 US oil company, rose after it said quarterly earnings more than doubled on higher energy prices and some one-time gains, though asset sales cut into oil and gas production. Its shares rose 17 cents to close at $95.65.
Rival Exxon Mobil was up 27 cents at $46.30.
"Given that the energy sector has been such a strong driver of the better S&P earnings results, I think investors have something of a love-hate relationship with higher energy prices," Caffrey said.
"They like the earnings component that they're giving to the S&P, but at the same time, they recognise that it's increasing some of the inflationary pressures." Meanwhile, Gilead shares jumped after it reported a higher quarterly net profit on increased sales of its flagship HIV drug. Gilead rose $5.14, or 8.64 percent, to $64.64.
Other technology stocks advanced, including chipmaker Intel, up 14 cents at $24.38, and Dell, up 21 cents at $35.47.
Global computer memory chip sales grew 20 percent to $6.7 billion in the second quarter of 2004 from the previous quarter, but the industry is facing tough times ahead, US research firm Gartner said on Friday.