Spanish oil major Repsol said on Tuesday its board of directors approved a $5 billion settlement with the government of Argentina, ending a two-year dispute over the seizure of the company's operations in the country.
Though the compensation is half of what Repsol initially demanded after Argentina expropriated its majority stake in energy firm YPF, the company has been eager to end a rocky chapter in its history and avoid a drawn-out legal fight.
Argentina hopes the agreement will help it attract foreign investment in the country, which holds one of the world's most promising shale gas and oil formation.
"I think to finally reach a friendly agreement on this contentious issue that has taken two years is extremely positive," Repsol Chairman Antonio Brufau said in a video message that accompanied a statement on the terms of the deal.
YPF President Miguel Galuccio, speaking to reporters in Buenos Aires, praised the deal as a crucial step for Argentina's economy. "YPF is a fundamental tool for the country's energy future and I believe the expropriation has given that tool back to Argentines."
(Read More: This explains the strange action in natural gas)
Under the agreement, Repsol will receive a package of three dollar-denominated Argentine sovereign bonds with a nominal value of $5 billion. It will also receive additional bonds for a maximum face value of up to $1 billion to compensate for the market discount on the first group of bonds.
Argentine sovereign bonds mostly trade at a steep discount since the country defaulted on international debt in 2002.
The total market value of the combined packages will be at least $4.67 billion, which could be supplemented by $500 million in back interest payments on one of the bonds, known as the Discount 33.
Repsol can sell the bonds whenever it wants though the final amount it receives for the bonds cannot exceed $5 billion after expenses and interest.
(Read more: Natural gas could rise to $8: Energy expert)
As part of the deal, which follows nearly three months of negotiations in Buenos Aires and still requires approval from Repsol's shareholders and the Argentine Congress, Repsol will drop all lawsuits against Argentina and waive any future legal claims.
After the seizure, Repsol initially sought $10.5 billion in compensation in international arbitration.