SAN ANTONIO (AP) — Valero Energy Corp. said Tuesday it lost $432 million in the first quarter as it took a $605 million after-tax charge from closing a refinery in Aruba.

The San Antonio company, which owns refineries and gasoline stations, reported a loss amounting to 78 cents per share for the first three months of the year. That compares with a profit of $98 million, or 17 cents per share, for the 2011 first quarter.

Revenue increased by 34 percent in the quarter to $35.17 billion, from $26.31 billion last year.

Excluding the suspension of operations at the Aruba refinery, Valero said it would have earned 31 cents per share in the period.

Analysts, who typically exclude special charges, were expecting earnings of 26 cents per share, on average, according to data provider FactSet. Wall Street's average revenue forecast was $26.6 billion.

Valero closed the 235,000 barrel-per-day Aruba plant this year after struggling to generate profits. The company is mulling the possibility of turning the refinery into a fuel storage terminal.

From January to March, Valero said its refining business turned a loss for the quarter, reversing a year-ago profit, because of the plant shutdown. Its retail gas stations profit declined by 39 percent and its ethanol business saw profit decline by 80 percent.

The company produced 21.5 percent more gasoline, diesel and other petroleum products thanks to its acquisition of the Pembroke and Meraux refineries. However, the $2.11 per barrel its refineries earned was less than half what they earned a year ago. The drop in profit margin was due to the Aruba plant closure, Valero said.

Valero shares added 34 cents to $25.05 in morning trading. The stock has traded as high as $28.70 and as low as $16.40 in the past 52 weeks.