Updated

Argentina is hoping to have an easier time attracting international investors to exploit its oil and gas fields now that its Congress has approved a $5 billion payoff to Spain's Grupo Repsol for the controlling stake in the YPF oil company it seized.

The deal was approved early Thursday by a vote of 135-59 with 42 deputies abstaining after a marathon debate in Argentina's legislature.

Repsol had already agreed to the indemnity package, accepting less than half what it originally demanded for the 51 percent stake in YPF that President Cristina Fernandez nationalized two years ago. In exchange for the bonds, Repsol is dropping all legal action against YPF and other potential investors in the "Vaca Muerta" shale deposits that the company discovered under Repsol's leadership.