When's the last time you recall a company reporting earnings that matched the entire gross domestic product of a nation the size of, say, Libya? That's what occurred Thursday, when ExxonMobil (NYSE:XOM) reported that its net income for all of 2006 reached $39.5 billion, up 9% from the paltry $36.1 billion the company had left after expenses the previous year.

However, its fourth-quarter results actually slipped year over year, hindered by the slide in crude prices that began in July, along with lower crude oil and natural gas production in the United States, Canada, and Europe.

For the quarter, ExxonMobil's results weren't materially dissimilar to those of ConocoPhillips (NYSE:COP), which last week reported a 13% decline in its fourth-quarter net income, resulting largely from lower refining margins and natural gas prices. Also reporting Thursday: Royal Dutch Shell (NYSE:RDS-B), which reported an overall increase in fourth-quarter net income but also saw earnings from oil production drop 3%.

ExxonMobil's fourth-quarter net income was $10.25 billion, or $1.76 per share, versus $10.71 billion, or $1.71 per share, in 2006. Why did per-share results increase 3% in the face of a 4% reduction in net income? The company bought back 115 million of its shares during the quarter, at a cost of $8.4 billion. The buybacks effectively reduced the company's shares outstanding at the quarter's end to 5.729 billion, from the 5.832 billion outstanding at the end of the prior quarter.

Some of the more significant year-over-year earnings changes in the company's quarter occurred in U.S. upstream earnings -- covering exploration and production activities -- which contributed $1.05 billion to the corporate total, 41% less than the same figure a year earlier. At the same time, total downstream earnings -- primarily refining and marketing -- were about 18% lower, based largely on reduced refining margins.

So with fourth-quarter results declining, production levels in several key parts of the world falling, and commodity prices lower than they were six months ago, what should Fools make of ExxonMobil's results. More importantly, how should they view the company's prospects as an investment?

I strongly believe that ExxonMobil is an ideal component of a Foolish portfolio. In the short term, warmer-than-normal weather did affect production levels in some parts of the world, leaving both crude and natural gas prices lower than anticipated. But in the longer term, crude prices are driven more by things like growing demand in developing nations -- such as China and India -- and by geopolitical "events."

Given the rampant instability in many of the world's oil-producing nations, the petroleum market will likely get shaken up by those sorts of events at some point. Given this, and the need to expand worldwide production, I remain convinced that Foolish investors should consider at least some representation from ExxonMobil and perhaps Schlumberger (NYSE:SLB), the largest of the energy-service companies, in their portfolios.

For related Foolishness:

Fool contributor David Lee Smith does own shares in Schlumberger but not in any of the other companies mentioned. He welcomes your questions or comments. The Fool has a disclosure policy.