Updated from July 29

Oil's surge helped ExxonMobil ( XOM), the world's largest energy company, post its best quarter ever Thursday and one of the most profitable three months in U.S. corporate history.

Exxon said second-quarter earnings shot up 39% to $5.79 billion, or 88 cents a share, matching the Thomson First Call consensus. Revenue rose 24% to $70.69 billion. Earnings in the company's enormous exploration and production unit rose by more than $1 billion to $3.85 billion, reflecting a 1% increase in oil and equivalents production.

In the company's downstream segment, earnings rose fivefold to $1.5 billion, reflecting higher refining margins offset by moderate weakness in marketing profitability.

"ExxonMobil is basically clicking on all cylinders," said Oppenheimer analyst Fadel Gheit, who recommends the stock and also owns it himself.

Gheit said all three of ExxonMobil's major businesses -- production, refining and chemicals -- are performing well in the current environment.

With crude futures hitting $43.05 a barrel -- a level previously unseen on the New York Mercantile Exchange -- Exxon joined a slew of energy companies that have recently raced to the market with news of gushing profits. ConocoPhillips ( COP), for example, posted a 75% jump in second-quarter profits after worldwide oil prices hovered near the $35 mark in recent months.

ConocoPhillips technically delivered a miss on Wednesday, however. Income from continuing operations came in a nickel shy of the consensus estimate at $2.88 a share.

Looking at the bottom line, the Houston energy giant earned $2.075 billion, or $2.97 a share, in the three months to June 30, compared with earnings of $1.187 billion, or $1.73 a share, last year. Revenue rose 25% to $31.9 billion

The company's stock slipped 5 cents to $76.42 after Tuesday's update. ExxonMobil also was down slightly, falling 4 cents to $45.37, despite the surge in oil prices.

Gheit said that investors were probably piling into oil production stocks -- which are more directly affected by current energy prices -- instead. He believes that investors will only start to favor oil majors like ExxonMobil after energy prices stabilize and the big producers, such as Apache ( APA) and Occidental ( OXY), start to look too risky. He is convinced that oil is carrying a "fear premium," totaling as much as $15, that will prove unsustainable in the long run.

If you liked this article you might like

Lessons Learned From the Hedge Fund Crisis

Lessons Learned From the Hedge Fund Crisis

Why There's Still Hope for Detroit

Why There's Still Hope for Detroit

GM's Biggest Foe Could Be Time

GM's Biggest Foe Could Be Time

Humana's Learning to Change With the Times

Humana's Learning to Change With the Times

Health Insurers See 'Universal' Opportunity

Health Insurers See 'Universal' Opportunity