The Argentine government and Spanish oil company Repsol on Thursday signed a $5 billion accord putting an end to the bitter dispute that erupted after President Cristina Fernandez expropriated 51 percent of Repsol's stake in energy company YPF in May 2012.

The agreement establishes compensation for the Spanish oil firm of $5 billion in dollar-denominated government bonds, a debt that will be settled by 2033, at the latest, if the bonds are held to maturity.

The accord was signed in Buenos Aires by Argentine Economy Minister Axel Kicillof, the general secretary and administrative counsel of Repsol, Luis Suarez de Lezo Mantilla, and the Spanish firm's business director, Nemesio Fernandez Cuesta Luca De Tena.

With this accord, "Repsol accepts ... the sum of $5 billion ... paid in sovereign bonds as compensation for the expropriation" in May 2012, the Argentine Economy Ministry said in a communique.

Simultaneously on Thursday, Repsol and YPF signed another agreement in the Argentine capital agreeing to "the waiver of legal action, as well as a series of ... mutual indemnities," according to a communique issued by the Spanish oil company, which holds a 12 percent participation in Argentina's largest hydrocarbon production firm.

YPF said that this "significant step" will allow it "to focus all its effort and professionalism on the development of (Argentina's) energy resources."

The agreement means that Argentina will issue $6 billion in public debt, including $5 billion in bonds that will be turned over to Repsol and another $1 billion in securities to cover the amount agreed to as an indemnity in case the bonds decline in value below their initial level.

Repsol, however, will not be able to receive more than $5 billion, whether through the sale of the bonds in the market at more than their initial value or by holding them until they mature.

Both sides agree to terminate any pending judicial or arbitration processes and to waive future claims, according to a press release issued earlier in the week by the firm.

The YPF expropriation sparked diplomatic tensions between Spain and Argentina, and Repsol had vowed that it would seek at least $10.5 billion in compensation for its former unit. EFE