Argentina's Senate has approved the settlement reached between Spain's Repsol and President Cristina Fernandez's administration, which has agreed to pay the Madrid-based oil major $5 billion in bonds to compensate it for the expropriation of its majority stake in energy company YPF two years ago.

After more than 11 hours of debate, Fernandez's allies in the upper house used their majority to approve the deal by a vote of 42-18 with eight abstentions.

The compensation deal was signed on Feb. 27 and calls for Argentina to pay Repsol with dollar-denominated bonds that mature between 2017 and 2033.

The accord provides "adequate and fair compensation," Sen. Rosana Bertone of the governing Front for Victory party said during the debate, adding that it will enable the government to move forward with the investment plan for YPF, Argentina's largest oil company.

The head of the Senate's Energy Committee, Guillermo Pereyra, added for his part that the accord opens the door for new companies to invest in Argentina.

The president of the center-left opposition Radical Civic Union's national committee, Ernesto Sanz, acknowledged there "have been exploration and production improvements" since the government takeover of YPF because profits are being reinvested rather than being transferred abroad.

Nevertheless, he said he voted against the compensation deal because "Kirchnerism (for Fernandez's predecessor and husband, the late Nestor Kirchner) is now taking the shortcut of an amicable solution to extricate itself from the mess it got itself into with the expropriation."

Sen. Fernando "Pino" Solanas, of the Unen coalition, said the agreement will require the payment to Repsol of $13.7 billion - including principal and interest arising from the bonds - and that the money "will come out of the pockets of the Argentine people."

But Sen. Anibal Fernandez, former Cabinet chief in the Cristina Fernandez administration, rejected that figure, saying that "in no case will Repsol receive more than $5 billion."

Under the agreement, Argentina will deliver Repsol an initial portfolio of bonds with a face value of $5 billion, the Spanish oil major says on its Web site.

However, if the market value of that portfolio does not amount to at least $4.67 billion four business days prior to the closing of the deal, Argentina must deliver additional bonds to Repsol up to a maximum additional face value of $1 billion, the company adds.

The accord still must be approved by Repsol's board, which will meet at the end of March, and by Argentina's lower house of Congress.

YPF has been under Argentine government control since Congress gave the green light in May 2012 for the expropriation of a 51 percent stake in the company from Repsol, whose stake in the Buenos Aires-based company has been reduced to 12 percent.

YPF posted net income last year of 5.7 billion pesos ($710.1 million), up 45.6 percent from 2012. EFE