By Carlos Ruano and Andrés González
MADRID (Reuters) - Repsol and Argentina reached a preliminary deal on Monday for the Spanish oil major to get paid for the 51 percent stake in the South American's country's main energy company YPF
If the deal is approved by Repsol at a board meeting scheduled for Wednesday in Madrid, it could spark a wave of international investment in Argentina's vast Vaca Muerta shale oil and gas formation.
Spain's government was proposing Repsol receive $5 billion in compensation and that both Repsol and YPF each name investment banks to advise on the valuation of the stake seized, said one source.
Argentina - at loggerheads with the global markets since its 2002 sovereign bond default and subsequent interventionist economic policies - has been slow to attract the billions of dollars in capital needed to exploit Vaca Muerta.
Argentina seized Repsol's majority stake in the Buenos Aires-based energy firm YPF last year, arguing the Spanish company had not invested enough. The move shocked Argentina's European trade partners and put off much-needed energy investment.
After the 2012 expropriation of YPF, Repsol lodged a complaint with the World Bank arbitration tribunal, the International Centre for Settlement of Investment Disputes and has threatened to sue any company that partners with YPF.
The chairman of La Caixa bank
The Argentina government said in a statement it had struck an initial compensation deal with the Spanish firm including liquid assets. In return, Repsol would drop its complaint to the World Bank, it said.
Argentina is under pressure to strike a deal as it seeks partners for Vaca Muerta, one of the biggest reserves in the Western Hemisphere. The accord could signal flexibility on the part of Argentine leader Fernandez as she heads into the last two years of her second term.
Argentina last month said it would pay about $500 million to resolve disputes with several European and U.S. corporations as it seeks to rebuild foreign investor confidence amid a bitter court dispute with some bondholders.
Also on Monday, Mexico's Pemex said it reached an agreement in principle with Spain's Repsol and Argentina over compensation for the YPF expropriation. Pemex
Defusing the spat could open the door for Pemex to help exploit Vaca Muerta.
Mexico's Pemex, which has a 9.4 percent stake in Repsol, have publicly disagreed with the strategy of suing firms that partner with YPF.
Pemex has said it is talking informally with YPF about participating in the Vaca Muerta venture in the future.
La Caixa has a 12 percent stake in Repsol.
(Additional reporting by Maximilian Heath and Alejandro Lifschitz in Buenos Aires, David Alire Garcia in Mexico City and Tracy Rucinski in Madrid; Writing by Sarah Morris and Hugh Bronstein; Editing by David Evans and Leslie Gevirtz)