Argentina's government on Thursday thanked Spanish Prime Minister Mariano Rajoy and Mexican President Enrique Peña Nieto for the "very positive" role they played in helping it reach an agreement with Spanish oil company Repsol on compensation for the takeover of its former unit, YPF.

"Without their participation, we wouldn't have been able to reach this agreement," Carlos Zannini, a senior aide to Argentine President Cristina Fernandez, told the Senate about the role that Rajoy, Peña Nieto and Spanish Industry, Energy and Tourism Minister Jose Manuel Soria played in the negotiations.

Zannini hailed the "transparent" agreement that the Argentine government and Madrid-based Repsol signed on Feb. 27 in Buenos Aires.

Under the agreement, the Spanish oil major will receive a package of dollar-denominated sovereign bonds with a nominal value of $5 billion from the Argentine government, which is to fully settle the debt in 2033.

"I think Repsol made concessions and we paid a fair price," Zannini said, adding that as part of the settlement the Spanish oil company agreed to cease all legal action against Argentina.

He described the compensation deal as the "beginning of a new era" for the Argentine energy firm.

The accord must be approved by the Senate's Energy and Budget committees before it can be brought up for debate by the full chamber. If passed by the Senate, it will then go to the lower house.

The settlement also must be green-lighted by Repsol's board of directors, which will meet in Madrid on March 28.

Buenos Aires-based YPF has been under state control since the Argentine government expropriated a 51 percent stake in the company in 2012 from Repsol, which currently has a 12 percent interest in its former unit.

The Argentine oil company posted net income of 5.7 billion pesos ($722.7 million) last year, up 45.6 percent from 2012. EFE