Near-record prices for oil continue to support bottom lines, extending a string of massively profitable quarters for the industry as a whole. Exxon, the world's largest nonstate-controlled oil company and the largest U.S. public company, both by market capitalization, still reported a quarterly profit of $10.26 billion for the quarter, among the largest in U.S. history.

Royal Dutch Shell PLC, the No. 2 oil company, reported a similarly flush net profit of $8.67 billion, up 18%, demonstrating the industry's growth potential when firing on all cylinders.

Net income at Exxon, of Irving, Texas, fell 1% from $10.36 billion a year earlier and missed analysts expectations because of rising costs and lower production. Revenue slipped to $98.35 billion from $99.03 billion.

Production woes and cost inflation have affected the entire industry as oil companies spend more on increasingly expensive rigs, equipment and services to tap bigger and more complicated projects.

"Obviously we're not immune to the impacts of higher costs and we work very hard to offset those," said Henry Hubble, Exxon vice president of investor relations.

The market has come to view Exxon as the most capable operator in the oil patch. Missing expectations sparked greater skepticism over the industry, even after oil prices briefly rose past the market's record settlement high of $77.03 a barrel before falling back. Exxon's shares fell $4.56, or 4.9%, to $88.23 in 4 p.m. New York Stock Exchange composite trading yesterday, contributing to the broader market's swoon.

Exxon reported that its global production of oil and gas was down 1%, although the impact of production quotas by members of the Organization of Petroleum Exporting Countries and international contracts that reduce Exxon's share of oil when prices rise were partly responsible. Oil companies are struggling to find suitable opportunities to increase production while still making an adequate return.

Exxon was hurt by lower-than-expected production in Africa and low natural-gas prices, but helped by near-record refinery and chemical segment earnings. Overall, it was one of the largest profits ever reported by a stockholder-controlled company. Exxon's best performance was its $10.7 billion profit it reported in the fourth quarter of 2005. A small number of companies have reported bigger profits largely because of one-time accounting adjustments and divestitures.

Exxon reported earnings of $1.83 a share, down from $1.72 a share a year earlier and falling short of Thomson Financial's analyst-survey estimate of $1.96.

"Some of these results have been viewed as light, but I think that misses the forest for the trees," said Doug Terreson, an energy analyst with Morgan Stanley. "The common denominator is that results were near record levels," he said. "It's hard to be unhappy with a $10.3 billion quarterly profit."

Exxon has spent $5 billion a quarter on capital expenses since the beginning of 2006, and Exxon officials said that should rise only slightly next year. The company spent $2 billion on dividends in the second quarter and $7 billion to acquire and retire 99 million of its shares.

Shell's surge in profit yesterday benefited from strong refining margins that offset a dip in production. The increased earnings at Shell have been the exception this quarter. Rivals BP PLC, ConocoPhillips, Italy's ENI SpA and Spain's Repsol YPF SA all reported declines in profits this week.

Some Wall Street analysts were concerned about Shell's falling output, a trend that has been replicated across the industry as major oil companies contend with declining production at their mature fields and the challenges of finding new reserves. "All the oil companies are struggling to grow production," said Peter Hitchens, an analyst at brokerage Teather & Greenwood. "It's becoming more and more difficult to bring projects in on time and on budget."

Shell had a year-over-year decline in earnings from exploration and production, while profits rose 42% at its refining unit. Shell said output was hurt by warm weather in northwestern Europe, which reduced demand for North Sea gas, and unrest in Nigeria, where gunmen have been attacking oil facilities and kidnapping workers. In Nigeria, 195,000 barrels a day remains shut down and Shell could give no firm date for a return to full production.

Shell's results amounted to $1.38 a share, compared with $7.32 billion, or $1.13 a share, a year earlier. Revenue increased 2% in the second quarter to $84.9 billion. The quarterly earnings were boosted by a net gain of $660 million.