SAN ANTONIO (AP) — Valero Energy Corp. says its third-quarter profit fell 54 percent as the company was squeezed by thinner margins on gasoline and diesel and smaller discounts on certain types of crude oil that it refines.

San Antonio-based Valero on Tuesday reported refining income declined sharply, but Valero's ethanol business posted an operating profit, reversing a year-ago loss.

Third-quarter net income was $312 million, or 57 cents per share, down from $674 million, or $1.21 per share, a year earlier. The 2012 results would have been $1.90 per share excluding charges for a write-down and severance expense related to a refinery in Aruba.

Revenue rose 4 percent to $36.14 billion.

Copyright 2013 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.