Stocks ended barely changed Friday as investors digested a slower-than-expected GDP report and focused on sky-high crude oil prices. Only an afternoon surge of buying — the second this week — pushed stocks slightly higher.

Analysts noted that late-day buying is common at the end of the month as mutual funds and large investors adjust portfolios and purchase options. The major indexes ended the week higher for the first time in over a month, but ended July with steep losses.

The Dow Jones industrial average (searchrose 10.32 points, or 0.10 percent, to close unofficially at 10,139.56. The Standard & Poor's 500 Index (searchadded 1.27 points, or 0.12 percent, to 1,101.70, based on the latest data. The technology-laced Nasdaq Composite Index (searchgained 6.31 points, or 0.34 percent, to 1,887.37.

For the week, stocks rose. The 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.

However, despite the week's gains, the market ended July sharply lower. For the month, the Dow fell 2.8 percent, the S&P 500 was down 3.4 percent and the Nasdaq suffered a 7.8 percent loss. Concerns over third- and fourth-quarter earnings, oil prices and economic health outweighed an otherwise strong second-quarter earnings season, and July's losses could spill into August as economic issues take over the debate.

U.S. gross domestic product rose less than economists had predicted in the quarter as shoppers curbed their free-spending ways amid a sharp advance in energy prices, according to a report from the Commerce Department (search).

Climbing oil prices also gave investors more to worry about. A barrel of light sweet crude closed at a record $43.80, up $1.05, on the New York Mercantile Exchange (search), and prices showed no signs of retreat.

"Oil prices may go up even further before they go down," said Keith Keenan, vice president of institutional trading at Wall Street Access. "I think there's probably a six to eight dollar premium on prices because of terror worries, and I don't see that going away any time soon."

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.

While the GDP data is an important indicator for the overall health of the economy, investors already knew that the economy hit a "soft spot," as Federal Reserve (search) Chairman Alan Greenspan put it, in June. The next round of economic figures for July, starting with job creation figures next Friday, will carry even greater weight as Wall Street tries to discern whether the soft spot will continue.

However, some investors were consoled by the fact that inflation no longer seems to be an issue, and that the Fed might relax its plans for future interest rate hikes. The Commerce Department  report did note that an important inflation gauge, excluding energy and food, rose at an annual rate of 1.8 percent in the quarter, down from a 2.1 percent hike in the first quarter.

Strong earnings from Gilead Sciences Inc. (GILD) helped push up the Nasdaq, after the biotechnology company reported a higher quarterly net profit on increased sales of its flagship HIV drug. Gilead rose $5.65, or 9.5 percent, to $65.15.

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, U.S. research firm Gartner said on Friday.

 

ChevronTexaco Corp. (CVX), the No. 2 U.S. oil company, climbed 17 cents to $95.65 as it announced a doubling of its second-quarter profits from a year ago. The petroleum giant blew past Wall Street expectations by $1.12 cents per share, though that figure includes 79 cents per share in one-time benefits.

Rival Exxon Mobil (XOM) was up 27 cents at $46.30.

Retailer Target Corp. (TGT) will generate $1.65 billion in cash with the sale of its struggling Mervyn's department stores to an investment consortium. Target was down 73 cents at $43.60.

Archer Daniels Midland Co. (ADM) did not fare as well, posting a second-quarter loss due to litigation costs. The agricultural processor missed analyst estimates by a penny, and shares dropped 62 cents to $15.43.

Restructuring and cost-cutting helped Eastman Chemical Co. (EMN) to more than double its profits in the quarter and beat Wall Street expectations by 4 cents per share. Eastman gained 2 cents to $44.68.

Among the slew of economic reports out Friday morning was one from the National Association of Purchasing Management-New York (search) 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 U.S. 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.

Despite the slowdown, consumer confidence rose in July. The University of Michigan's (search) consumer confidence index rose to 96.7 for the month, up from 95.6 in June and better than the 96 reading Wall Street had expected.

The Russell 2000 index of smaller companies was up 1.44, or 0.3 percent, at 551.27.

Overseas, Japan's Nikkei stock average rose 1.9 percent. In Europe, Britain's FTSE 100 closed down 0.1 percent, France's CAC-40 gained 0.1 percent for the session and Germany's DAX index rose 0.2 percent.

Reuters and the Associated Press contributed to this report.