* Refining volumes rise by 172,000 barrels
* Ethanol business reports operating income vs loss year earlier
* Shares rise 2 percent before the bell (Adds analyst comment, details from statement, background, shares)
Oct 29 (Reuters) - Valero Energy Corp's third-quarter profit beat analysts' estimates by a wide margin as the U.S. Gulf Coast refiner processed more crude oil and sold more ethanol at a higher price.
The company's shares rose 2 percent in premarket trading.
Refining volumes jumped by 172,000 barrels per day to average 2.8 million barrels, mainly due to less unplanned maintenance activity and closures related to bad weather.
The company's ethanol producing business reported an operating income of $113 million in the quarter, compared with an operating loss of $73 million a year earlier.
The business contributed a fifth of the total operating profit in the third quarter.
"Third-quarter refining margins were challenged, but our story remains intact," Chief Executive Bill Klesse said in a statement on Tuesday.
Refining margins fell after costs of the crude the company processes rose in the quarter.
The price gap between the U.S. crude oil benchmark, West Texas Intermediate, and the European benchmark, Brent , collapsed in July for the first time since 2010. The differential stayed between $2 and $6 per barrel for the next couple of months.
The shrinking spread also hurt refining margins at companies such as Canada's Cenovus Energy Inc and Husky Energy Inc.
The closely watched spread is now widening again.
Macquarie Securities analyst Chi Chow, however, warned crude spreads could narrow by the end of the year due to supply outages over the next few weeks and the end of major industry turnaround activities.
Valero said its operating income was also hurt by higher costs for renewable identification numbers to comply with the U.S. federal Renewable Fuel Standard.
Costs to buy biofuel credits have risen as companies fear a shortfall as the law would require use of more ethanol than can be physically blended into the fuel supply.
Third-quarter net profit more than halved to $312 million, or 57 cents per share, from $674 million, or $1.21 per share, a year earlier.
Excluding items, Valero earned 41 cents per share, in line with analysts' estimates, according to Thomson Reuters I/B/E/S. (Reporting by Sayantani Ghosh in Bangalore and Anna Driver in Houston; Editing by Sriraj Kalluvila)