By Laurence Iliff and Ilan Brat 

Mexico's state-owned oil company Petróleos Mexicanos, or Pemex, is unloading most of its stake in Spanish oil company Repsol SA, selling shares worth around $3 billion and winding down a decadeslong partnership that had turned sour in recent years.

In a filing with the Madrid stock exchange, Citigroup said it was selling 104.1 million shares, or 7.9% of Repsol, in a private placement on behalf of Pemex. Deutsche Bank was the other book runner for the sale, which Citigroup said was expected to take less than a day to complete.

The shares represent most of Pemex's 9.3% stake in Repsol.

Mexican government officials have said selling the stake would be in Pemex's interest given that it can use the money at home on exploration and production. Under an energy overhaul passed last year by Congress, the company will face competition from private and foreign companies that will be allowed back into the oil and gas sector for the first time in 76 years.

Despite greatly increased annual investment budgets, including $27.7 billion planned for this year, Pemex has been unable to raise its crude oil output from around 2.5 million barrels a day in recent years as its easily extracted oil runs out and it tackles more complex and expensive-to-produce reserves.

The Mexican state company has had a rocky relationship with Repsol Chairman Antonio Brufau in recent years, and through its position on the Repsol board had unsuccessfully attempted to dislodge him from his post.

Pemex had no immediate comment on the sale. A spokesman for Repsol in Madrid declined to comment.

The stake sale throws into question the future of any cooperation at a time when Pemex is expected to begin joining with private firms to develop reserves in Mexico.

"There's not really anything strategic that has come out of the relationship. There's been talk of collaboration, but nothing beyond technical exchange agreements they have with other companies," said John Padilla, managing director of energy consultancy IPD Latin America. Pemex could either keep the proceeds abroad and invest in projects that give it badly needed experience--such as partnering in the U.S. in shale gas or deep water oil projects-- or use the money for its operations inside Mexico, Mr. Padilla said.

For decades, Pemex kept a low profile in its partnership with Repsol, rotating the representatives that it would send to Repsol board meetings. But the alliance deteriorated under the previous Pemex management, which doubled its stake in Repsol and sought to oust Mr. Brufau via a shareholder pact with struggling construction company Sacyr-Vallehermoso SA. The 2011 pact fell apart after Sacyr had to sell half of its 20% Repsol stake to pay debt.

Pemex and Repsol patched up the dispute, signing an accord to cooperate on upstream and downstream business opportunities. The partnership fared no better after Mexico's change of government in 2012 and the appointment of current chief executive Emilio Lozoya to head Pemex, who has been critical of returns on the investment in Repsol.

The divorce is also unlikely to faze the Spanish company, which is flush with cash after selling the bonds it received from Argentina as compensation for the country's 2012 expropriation of its local unit, YPF SA in a deal Pemex helped to broker, and unloading the remaining stake it held in YPF.

Although Repsol executives have repeatedly said they're willing to collaborate with Pemex to help boost Mexico's oil production by investing there, the Madrid-based company is focused on growing by buying oil companies or assets in wealthy countries like Canada or Norway.

Anthony Harrup contributed to this article.

Write to Laurence Iliff at laurence.iliff@wsj.com and Ilan Brat at ilan.brat@wsj.com

Subscribe to WSJ: http://online.wsj.com?mod=djnwires

YPF Sociedad Anonima (NYSE:YPF)
Historical Stock Chart
From Feb 2024 to Mar 2024 Click Here for more YPF Sociedad Anonima Charts.
YPF Sociedad Anonima (NYSE:YPF)
Historical Stock Chart
From Mar 2023 to Mar 2024 Click Here for more YPF Sociedad Anonima Charts.