(Adds details)

By Adriano Marchese and Anthony Harrup

Royal Dutch Shell PLC said Monday that its unit Shell Oil Company has reached agreement to sell its interest in a joint-venture refinery in Texas to Mexican state oil company Petróleos Mexicanos for $596 million.

Shell Oil Company will exit the 50-50 Deer Park Refining Ltd. Partnership JV with Pemex unit P.M.I. Norteamerica SA de CV, and transfer its interest to Pemex.

"Shell didn't 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," Shell Downstream Director Huibert Vigeveno said.

The $596 million for Shell's share of the 340,000 barrel-a-day refinery will be a combination of cash and debt, plus the value of the hydrocarbon inventory.

The transaction is expected to close in the fourth quarter.

Pemex, the world's most highly leveraged oil company with debt of $113.9 billion at the end of the first quarter, said the acquisition will be financed by the federal government without the company having to resort to more debt.

"We now have a new refinery," said Mexican President Andrés Manuel López Obrador, a nationalist who favors state ownership of the country's energy sector over private participation.

With complete ownership of Deer Park, a new refinery Pemex is building in southern Mexico, and upgrades to other Pemex refineries, Mr. López Obrador hopes to eliminate the country's heavy reliance on fuel imports.

"Pemex is going to process all its crude, convert it into gasoline, diesel. We're going to be self-sufficient by 2023," Mr. López Obrador said in a message posted online.

Write to Adriano Marchese at adriano.marchese@wsj.com and Anthony Harrup at anthony.harrup@wsj.com

(END) Dow Jones Newswires

05-24-21 1630ET