HOUSTON - Valero Energy Corp reported a deeper-than-expected quarterly loss on Tuesday as weak fuel demand in the slow economy weighed on results for the largest U.S. refiner.

Refiners have seen their margins hit hard as the global recession hurts demand for products like diesel and stockpiles have swelled. Additionally, lower-grade, or sour crude oil that some of the refineries process has lost much of the cost advantage over higher-grade crude.

As we strive to lower costs and become even more competitive, we expect the improving world economy will drive demand growth for our products and support a recovery in refining margins and sour crude discounts, Bill Klesse, Valero's chief executive said in a statement.

Demand should improve in 2010, he said.

The San Antonio company posted a net loss of $489 million, or 87 cents per share, compared with a profit of $1.2 billion, or $2.18 per share, a year ago.

Excluding one-time items that included a $417 million asset impairment, Valero posted a loss of 39 cents per share, falling short of analysts' average forecast for a loss of 33 cents per share, according to Reuters I/B/E/S.

The larger-than-expected loss was due in part to higher interest expense, research firm Simmons & Co International said in a note to clients, adding that poor third-quarter earnings are a given in the sector.

Revenue fell 46 percent to $19.5 billion.

To control costs, Valero shuttered its refinery in Aruba and streamlined operations at its Delaware City refinery. The company said it recently began to focus on cutting expenses at its Paulsboro refinery.

Valero, which operates 16 refineries in the United States, Canada and the Caribbean that have a combined capacity of about 3 million barrels per day, processed 2.379 million barrels per day, down 7 percent from a year ago.

Valero shares were down about 2 percent in premarket trade. (Additional reporting by Matt Daily in New York; editing by John Wallace, Dave Zimmerman) (Reporting by Anna Driver in Houston)