In spite of record ethanol shipments, Aventine Renewable Energy (NYSE: AVR) on Friday posted a second-quarter loss of $1.9 million, or 5 cents per share, compared to an income of $12.6 million, or 30 cents per share, in the year-ago quarter.

Excluding a one-time loss of $8.5 million related to auction rate securities, the company would have made $6.6 million, or 16 cents per share.

Aside from that cost, the company cited significantly higher corn costs, higher utility costs and higher legal and other professional fees compared with last year. Corn costs in the second quarter averaged $5.38 per bushel, or 73 cents per gallon, up from $3.99 per bushel, or 61 cents per gallon, in the same period last year.

That's not bad, considering the second-quarter corn price amounts to a 20.6 discount from the average price for the period, according to the Chicago Board of Trade. The company paid 7.5 percent more than the average price for corn in the second quarter of last year.

Those higher corn costs also were offset by higher prices for ethanol of $2.50 per gallon, compared to an average of $2.29 per gallon in the second quarter of 2007.

According to the company, the commodity spread - or the price of the ethanol minus the cost of the corn used to make the fuel - actually increased to $1.29 per gallon in the second quarter from $1.28 per gallon in the year-ago quarter.

And the company sold a record amount of ethanol in the second quarter, shipping 220.3 million gallons compared with 158.7 million in the same quarter last year. As a result, Aventine posted record revenue of $601.6 million, compared with $394 million last year.

"The continued strong demand for ethanol reflects the new realities of high oil and gas prices, resulting in a record number of gallons shipped during the quarter," CEO Ron Miller said. "Ethanol remains the best available opportunity to help the American consumer reduce the increasingly negative impact on their household budget as a result of high gas prices."

So why the fallen profit?

The only hint in the announcement is that Aventine's ethanol production decreased to 45.6 million gallons from 50.7 million gallons in the second quarter of 2007. The rest of the fuel came from marketing partners and deals in which the company bought and resold fuel, as well as from its inventory. Those deals ended up increasing the company's overall costs, year over year.

The company narrowed its loss over the first quarter of this year, when it posted a loss of $10.8 million, or 26 cents per share. Excluding a $23.1 million loss from auction rate securities, first-quarter results would have come to $12.3 million, or 29 cents per share - making income, minus one-time charges, about flat.

In a research note, Thomas Weisel Partners analyst Jeff Osborne said Aventine's operating results beat the firm's expectations. He raised his full-year revenue estimate for the company to $2.46 billion from $2.4 billion, increased his earnings estimate to 70 cents per share from 43 cents per share and increased his price target to $9 per share from $7.50 per share.

He lowered his 2009 estimate to $3.78 billion from $4.17 billion to reflect the slow pace at which marketing partners are coming online, while increasing his earnings estimate to $1.02 per share from 55 cents per share.

Shareholders apparently aren't too enthused. In recent trading, shares of Aventine fell 4.6 percent to $6.49 per share.

Still, the higher demand the company reported could be good news for the industry. Sugar company CSR also cited a growing demand for biofuel Friday, when it announced plans to boost its production of ethanol fuel from 38 million liters per year to 60 million liters per year (see The Australian).

VeraSun Energy Corp. (NYSE: VSE) - which in June had said it would delay the start up of three ethanol plants - last week announced it would start operating one of the shelved plants after margins improved (see The Week: Plugging Into Renewable Energy).

In the research note, Osborne said the strong performance from Aventine highlights the improving dynamics in the industry.

More information about the industry should come out when VeraSun, Pacific Ethanol (NSDQ: PEIX) and others post their earnings in the coming weeks.