Up until the last couple of months or so, times were pretty good for just about everybody in the refining game. Gasoline demand was staying firm despite much higher prices, and the spreads between the cost of oil and the price of finished refined products kept expanding. Good times indeed for the likes of Valero Energy (NYSE:VLO), Frontier Oil (NYSE:FTO), and Sunoco (NYSE:SUN).

So what to make, then, of Sunoco's recent earnings report? While results for the nation's eighth-largest refiner look good on a year-over-year basis, sequential comparisons look more sour than sweet.

Revenue climbed 37% for the first quarter, but dropped about 3% from the prior quarter. Net income followed the same pattern to a more exaggerated degree -- reported net income of $116 million was up 30% annually, but down 38% sequentially.

Look no further than the refining business to see the "how" and "why". While Sunoco managed to run at 97% capacity, the gross refining margin per barrel fell from $6.42 in December to $5.93 in March (still up from the year-ago level of $5.68/bbl). A similar pattern was seen in the chemicals business as strong year-over-year income growth didn't translate into sequential growth.

Unlike some other refiners like Valero, Sunoco focuses on light sweet crude; it has not realized the benefits of the higher spread between sweet and sour crudes. That said, the company does use some higher-acid crudes, and the spreads are still quite favorable. While acid crudes can sell for as much as a $10 discount per barrel, the additives needed to counteract the higher acidity cost only about $1 to $2 per barrel -- giving Sunoco an obvious incentive to use these crudes.

It's tough to have any real conviction about where Sunoco's business will go in 2005 and 2006. While spreads and margins are narrowing, they're still at historically strong levels, and the company continues to produce cash flow to share with investors. What's more, the longer-term picture still looks pretty good -- new refinery construction is a "no go" in most communities, oil supplies aren't expanding in any meaningful way, and more cars continue to hit the roads and burn up gasoline.

With the refinery industry looking to have reached at least a momentary peak, I'm not sure I could recommend buying this stock today. Sure, Sunoco has done a great job of returning cash to shareholders through a moderate dividend and an extensive share repurchase, but that's not likely to keep the stock buoyant when large investors turn their backs on the energy space. There's a lot to like about Sunoco, but this Fool would rather spend his time looking for other non-cyclical ideas right now.

For more fine Foolishness on refining:

Fool contributor Stephen Simpson has no financial interest in any stocks mentioned (that means he's neither long nor short the shares).