Shell has agreed to sell its 100% stake in Deer Park Refining to its joint-venture partner Petroleos Mexicanos (Pemex), the state-owned oil firm in Mexico for $596m.

Deer Park Refining is a 50-50 joint venture between Shell Oil Company and P.M.I. Norteamerica, a subsidiary of Pemex.

The transaction enables Pemex to gain full ownership of the refinery, subject to regulatory approvals.

Located in located in Deer Park, Texas, US, the refinery has a crude oil capacity of 340,000 barrels per day.

The Deer Park refinery processes crudes from Mexico, Canada, the US, Africa and South America, to produce gasoline, aviation fuels, diesel fuels, ship fuel and petroleum coke.

Shell said that the transaction will enable it to focus on its refining footprint, while maintaining integration optionality and retaining value through its chemicals and trading activities.

Shell downstream director Huibert Vigeveno said: “Shell did not plan to market its interest in the Deer Park refinery; however, following an unsolicited offer from Pemex, we have reached an agreement to transfer our interest in the partnership to them.

“Pemex has been our strong and active partner at the Deer Park Refinery for nearly 30 years, and we will continue to work with them in an integrated way, including through our on-site chemicals facility, which Shell will retain.”

Under the terms of the agreement, Shell Oil Company will sell its 50.005% interest in Deer Park Refining.  Shell Chemical will continue operating its wholly owned Deer Park Chemicals facility, adjacent to the site.

As part of the transaction, Deer Park employees will be assigned to work either in the refinery or chemical plant assets.

Employees assigned to the refinery assets will be employed by Pemex, and employees assigned to the chemical plant assets will continue employment with Shell.

Shell intends to retain its presence in Texas through its chemical facilities in Deer Park and its activities in the Permian Basin, and in Louisiana through Norco site.

Vigeveno added: “Above all, we remain committed to the wellbeing of our employees and will work closely with Pemex to ensure the continued prioritization of safe operations.

“We’re proud of our 90-plus year history as an operator and neighbor at Deer Park and we will continue to play an active role in the community.”

Recently, Shell signed an agreement with HollyFrontier to sell its Puget Sound Refinery in the US, for $350m.