Around half a million indebted Polish homeowners have won their fight to be freed from crippling Swiss franc mortgages.
The Swiss currency has doubled in value since 2008, sending mortgage-holders' debts soaring.
Now, the European Court of Justice (ECJ) has ruled that they can ask Poland's courts to let them convert their loans into the Polish zloty.
More than one in five Polish mortgages is held in Swiss francs.
Finance Minister Jerzy Kwiecinski said it was good news for consumers but the ruling was an unexpected blow for Poland's banking sector. Officials said the banks were well prepared but the banks are preparing for losses running into tens of billions of zloty.
Justyna Dziubak, who brought the case, celebrated her victory: "I've been fighting the banks for three years. It was worth it."
What went wrong?
Around 700,000 Polish households took out mortgages in foreign currencies in the years after Poland joined the EU in 2004. They have become known in Poland as "Frankowitzes".
They were not alone - Hungarians, Croats and Austrians did the same, attracted by low interest rates.
The Polish currency was strong at the time, but began to fall as the financial crisis kicked in and the Swiss franc surged. The biggest hit came in 2015, when the Swiss franc abandoned its currency ceiling against the euro.
Many Poles took their mortgages out when the franc was worth less than two zloty. By 2015 the franc had soared to five zloty and it has since fallen back to four. That means that many Poles are, even now, lumbered with twice their original debt.
At its peak, half of Polish mortgages were in Swiss francs, and that share is now 23%, according to the financial services firm Erste Group.
Why has the European Court intervened?
Kamil and Justyna Dziubak challenged the terms of their loan in a court in Warsaw, arguing that the terms in which the loan was linked to the Swiss franc were invalid because the bank was able to fix the exchange rate by itself.
The couple's was among 16,700 claims lodged by Poles seeking to have their loans converted into zlotys.
The Dziubaks' case then went to the ECJ in Luxembourg, which ruled on Thursday that EU law does not "preclude the annulment of those contracts". It allowed them to ask Polish courts to convert their loans, paving the way for perhaps thousands more claims, the BBC's Warsaw correspondent Adam Easton reports.
Mrs Dziubak told reporters after the ruling that consumers should not be scared of challenging the banks.
"I am very glad, of course. I hope that my story will be an example for others. Do not be scared, fight for your own," she said, adding that her children had given her the strength to fight back.
Other Frankowitzes were in the audience as campaigners announced the court ruling.
"I'll tell you, as a Swiss franc borrower, this ruling is a firecracker," said one man.
"I hope, thanks to this judgement, my case will now only be a formality" said another borrower, Magdalena Owoc.
What will it mean for the banks?
Although analysts suggested that the ruling was not clear-cut, it could have a big impact on the entire banking sector in Poland and the wider Polish economy.
If all of those Swiss franc mortgages were converted into Polish zlotys it could cost the banks between 20bn and 60bn zlotys (£12bn; €14bn; $15bn). That is the equivalent of between 1.5 and 5 times the banking sector's net profit last year, our correspondent writes.
Shares in Poland's biggest bank, PKB Bank Polski, were down 2% on Thursday, but Poland's financial watchdog KNF said the banks had a strong capital base and could absorb potential losses.
Homeowners will still have to take their cases through Polish courts and any conversion costs to zlotys could be spread over years.