MERAUX, La. (AP) -- Valero Energy Corp. agreed Thursday to acquire Murphy Oil Corp.'s refinery at Meraux for about $625 million.

The deal includes $325 million for the refinery and related assets and $300 million for the refinery's current inventory. San Antonio-based Valero said it plans to fund the purchase from available cash and hopes to close the deal in the fourth quarter if regulators approve.

El Dorado, Ark.-based Murphy Oil said the sale is part of a plan to exit the refining business.

The refinery has a capacity of 135,000 barrels per day. It has a Mississippi River dock, pipelines to Collins, Miss., and is located about 40 miles from Valero's refinery at Norco, La.

The deal also includes a product terminal, a 20 percent interest in the Collins Product Pipeline and terminal and a 3.2 percent interest in the Louisiana Offshore Oil Port.

"The Meraux refinery adds more hydroprocessing capacity to our portfolio," said Valero CEO Bill Kleese. "It's the right hardware in the right place."

Valero currently has 15 refineries with a capacity of about 2.9 million barrels per day, along with about 6,800 domestic and foreign retail fuel outlets.

The deal was announced after financial markets closed. In Thursday trading, Valero shares fell 23 cents to close at $22.49, while Murphy Oil shares dropped 4 cents to $53.54.