The Spanish company Repsol (REPYY -0.37%) announced February 25 that it had agreed to a settlement with Argentina over the expropriation of its assets in the Argentine energy unit YPF (YPF -3.40%). The Argentine government, led by President Cristina Fernandez de Kirchner, expropriated 51% of YPF, Argentina's largest energy company and former unit of Repsol, in 2012. YPF was formed as a government entity in the 1920s and privatized during a period of economic liberalization in Argentina in the 1990s. Shares of YPF were up more than 5% in the week following the announcement. Shares of the company doubled in 2013. 

The board of Repsol agreed to Argentina's proposal to transfer $5 billion in government bonds to the Spanish company, and issue additional bonds if their value fell below the agreed amount. The agreement also stipulates that if the Argentine government fails to pay, Repsol can seek accelerated repayment, and enforcement of the terms of the agreement through the international body UNCITRAL (United Nations Commission on International Trade Law) .

In return, Repsol agreed to cease all legal action against Argentina over the expropriation of YPF. Repsol filed a suit against Argentina in U.S. District Court in New York in May 2012 and at the International Center for Investment Disputes (ICSID) in December 2012. 

What now? 
This announcement is significant progress in the ongoing dispute. The terms seem to be the same as those agreed to on a preliminary basis last November. The agreement, however, still needs approval from Repsol's shareholders and the Argentine Congress.

According to reports, Repsol's largest shareholders are expected to approve the deal at the annual meeting in March or April. While the compensation is about half of what the company originally sought ($10.5 billion),  the agreement could help the company avoid a long and costly legal battle. The $10.5 billion figure it initially sought was also much higher than the company valued its stake in YPF at the time of expropriation. 

The Argentine government is also looking for a way to move past the dispute and attract the foreign investment YPF needs to develop energy resources in Argentina.  

Time to invest in Argentine energy? 
Chevron
(CVX 0.44%) signed a $1.5 billion agreement with YPF in July 2013 to develop shale oil and natural gas resources in Argentina's Vaca Muerta field. The Vaca Muerta field, discovered in 2010 in the Neuquen province, has the fourth-largest deposits of shale oil in the world and the potential to produce an estimated 27 billion barrels of shale oil. It also has the world's second largest deposits of shale gas. 

The announcement by Chevron in 2013 prompted Repsol to file a separate suit against YPF at ICSID, and also file a suit against Chevron in Spanish court. A final agreement between Repsol and Argentina would eliminate the legal dispute with Chevron, and could attract additional foreign investors who were previously deterred by the threat of litigation by Repsol. 

Considering the great potential of the Vaca Muerta field, a final agreement could help YPF attract foreign investment in the long term. Investing in Argentina still carries a high degree of risk. The Argentine government defaulted on $81 billion of sovereign debt in 2002, and has been involved in legal battles since. Analysts have also warned that Argentina's bond payment to Repsol could create a bond supply glut that would impact the government's ability to raise capital. 

Furthermore, plaintiffs who won a $9.5 billion judgment against Chevron in Ecuadorian courts for the dumping of toxic waste in the Amazon recently sought to recover Chevron's assets in Argentina. So far, the plaintiffs have been unsuccessful, but changing political winds in Argentina could present risks in the future.

Still, YPF's production has increased since the expropriation from Repsol, and its profits rose 88% last quarter. The company presents an opportunity for very high returns for investors with a tolerance for risk.

Investors with a position in Chevron should also be aware of the potential gains and losses associated with the company's partnership with YPF. Chevron announced that after its initial investment it could, in addition, invest as much as $17 billion in developing the Vaca Muerta field.