(Bloomberg) -- A US judge ruled against Argentina and in favor of entities funded by Burford Capital on claims the South American nation failed to pay fair value to shareholders when it nationalized the gas and oil company YPF SA in 2012.

US District Judge Loretta Preska Friday ruled in favor of the Spanish companies Petersen Energia Inversora S.A.U. and Petersen Energia S.A.U., which sued YPF and Argentina in 2015. While she granted a request by YPF to dismiss the claims, she determined that the Argentine government itself was liable, with damages to be resolved at trial.

Read More: Argentina Poverty Rises to 39%, Hurting Economy Before Election

The ruling increases the likelihood of a settlement over a case that has its roots in former President Cristina Fernandez de Kirchner’s decision to nationalize YPF, the country’s largest and most emblematic energy company. At that time, Petersen, controlled by the Eskenazi family, owned 25% of YPF. Kirchner is currently back in government as vice president and remains a key political figure in the country.

While the judge didn’t set a figure for the compensation, Argentina would have to pay $7 billion to $19.8 billion, newspaper La Nacion said on Friday, citing estimates provided by the funds. The country has been trying to rein in expenses to reduce its fiscal deficit under a $44 billion deal with the International Monetary Fund.

Burford’s New York-listed shares soared as much as 59%, an intra-day record, after the news. The London-listed shares were up 30% prior to being suspended. YPF’s US-listed shares dropped 1.8%.

“This look like a very substantial victory for Burford,” said Julian Roberts, an analyst at Jefferies, in a note. A settlement is possible, and the judge appears to mostly agree with Burford’s view on how to calculate damages, said Roberts, who advises buying the fund’s shares.

A lawyer representing Argentina in the case didn’t immediately respond to a request for comment. An Argentina government spokesman in Buenos Aires also didn’t respond to a request for comment.

The case is Petersen Energia Inversora, S.A.U. v. Argentine Republic, S.D.N.Y., 1:15-cv-02739, 3/31/23

--With assistance from Janet Freund and Scott Squires.

©2023 Bloomberg L.P.