Similar to larger competitor Valero (NYSE: VLO), independent refiner Tesoro (NYSE: TSO) returned to profitability in the second quarter.

The company, which focuses on the Western U.S., reported net income of $67 million, or $0.47 per share. That's a heap better than both the previous quarter and the year-ago period, when Tesoro lost $1.11 and $0.33 per share, respectively.

Taking the form of a one-time boost, favorable changes to the company's post-retirement benefits program contributed $0.17 per share to earnings. That said, by targeting both corporate overhead and employee benefits programs, management expects that it can deliver ongoing annual savings in the range of $120 million to $140 million, beginning with the current year.

Cost cutting of this nature is of course in line with the company's strategic focus on realizing efficiencies and minimizing debt. As such, we should note that management has slashed 2010 capital spending plans twice since late 2009, bringing the current estimate down to $475 million to $500 million.

Moreover, Tesoro forecasts that its breakeven cost per refined barrel will continue to decline through 2013, thanks to various planned operating improvements. Throw in temporarily reduced throughput in the current quarter (down 16% year over year) -- partially the result of an early Q2 refinery accident -- and it'd appear that Tesoro's future profits have room to run.

Well, maybe, but much still depends on the broader economy, particularly that of California. Tesoro did enjoy better diesel margins in the quarter, which management attributed to higher port and rail activity, the latter of which is reflected in the improved freight volumes of diesel-burning rail names CSX (NYSE: CSX), Union Pacific (NYSE: UNP), and Norfolk Southern (NYSE: NSC). Even so, gasoline margins were down 15% versus the year-ago period, reflecting a distinct absence of the Sunday driver.

Given that we're now moving out of peak U.S. gasoline demand season, combined with the very real prospect of a multiyear muddle-along economy, I'd be cautious on Tesoro, despite its historical strengths.

Try any of our Foolish newsletters today, free for 30 days.

Fool contributor Mike Pienciak holds no financial interest in any company mentioned in this article. The Fool has a disclosure policy.