Sunoco Inc. (SUN) has agreed to sell its Tulsa, Okla., oil refinery to Holly Corp. (HOC) for $65 million, a price tag that represents a steep decline in asset values amid an industry slump.

Sunoco put the 85,000-barrel-a-day refinery up for sale in 2008 and in December disclosed that it would convert the facility into an oil product terminal if it couldn't find a buyer.

Last year's skyrocketing crude oil prices - refiners' biggest cost - and weakening demand for useful products such as gasoline and diesel hit the sector's earnings after several years of historically high returns. Notional values of refining assets had plummeted, but buyers and sellers were having difficulty agreeing on prices. Thursday's announcement shows that a consensus is emerging, which may open the door to more transactions this year.

"If I was to pick who I thought did better, Holly didn't pay a lot for it," said Phil Weiss, an analyst with Argus Research. "They saw it as an opportunity to expand their business in a time when assets are cheap."

Holly paid almost half as much per barrel, adjusted for the complexity of the refinery, as Alon USA (ALJ) paid for the Krotz Springs, La., refinery last year. In fact, Tulsa's price tag takes us back to what refineries were selling for in the 1990s, said analyst Ann Kohler of Caris and Co.

Under the deal, which is expected to close June 1, Dallas-based Holly agreed to invest in upgrades necessary to meet environmental protection requirements, including installing a distillate treating system and sulfur-recovery unit. The divestiture also includes inventories of petroleum products, which will be priced at market value at closing.

Holly said constructing the unit that would produce ultra-low sulfur diesel would cost $150 million. Philadelphia-based Sunoco had estimated upgrades to the refinery would cost more than twice as much.

Holly said it will pay for the refinery as well as the upgrades using a $300 million credit facility it recently secured.

Holly has a history of being able to find lower-cost ways to upgrade refineries, analyst Jacques Rousseau with Back Bay Research wrote in a note to clients Thursday morning.

The deal is also made possible by the fact that Holly believes the Environmental Protection Agency will grant it a one-year waiver allowing it to continue selling high-sulfur diesel while it installs the new equipment. By 2010, U.S. refiners are required to lower the sulfur content of highway diesel by 97%.

The refinery, which started production in 1913, became part of Sunoco's portfolio through a merger with Sunray DX in 1968. Unlike the situation at many U.S. refineries, employees of the Tulsa plant aren't represented by the United Steel Workers union, which was successful in bargaining for higher pay this year despite the recession.

The crude and product slate at the refinery won't change much under Holly's ownership.

Sunoco shares recently traded 0.50% lower at $27.63. Holly's stock traded 3.4% higher at $21.81.

-By Susan Daker, Dow Jones Newswires; 713-547-9206; susan.daker@dowjones.com

(Jessica Resnick-Ault and Kerry E. Grace contributed to this article.)