Pemex will sell its 7.86 percent stake in Repsol worth around $3.0 billion, Citigroup and Deutsche Bank confirmed on Tuesday.
The sale ends a long relationship between Pemex and Repsol that had run into trouble in recent years.
The companies faced disagreements on policies including top management, and the handling of Repsol’s investments in Argentina.
Before the sale, Pemex held a 9 percent stake, which made it one of the top three Repsol shareholders.
Pemex publicly criticized the Repsol over Chairman Antonio Brufau’s leadership, including his handling of the Argentina’s nationalization of company’s YPF unit.
In 2011, Pemex tried to oust Brufau.
With the sale Pemex loses its seat on Repsol’s board.
Repsol and Pemex declined to comment.