Retailer Marks & Spencer has won its £30m ($53m) European Union court case for the right to deduct foreign losses from its British tax bill.
M&S could win a £30m tax rebate from the British Treasury
The European Court of Justice said M&S can offset its UK tax bill against losses made in other EU countries when it closed its operations there.
Britain's High Court sent the case to the European Court of Justice in 2003.
Tax experts say the ruling will not lead to governments having to pay out billions of pounds in tax rebates.
"The court has ruled that the UK tax regime isn't quite right, but overall, EU governments will be quite pleased with this result," said Bill Dodwell, a tax partner at consultants Deloitte.
'UK law went too far'
He said the ruling by the Luxembourg-based court made it clear that companies should not be able to claim tax relief on losses twice, both in the country they occurred and in the country they are based in.
"UK law went too far because it didn't allow M&S to claim tax relief in the UK, even when it couldn't claim it overseas because it had closed its foreign subsidiary," Mr Dodwell said.
The case will now go back to a British court for review, and M&S is expected to claim some £30m in back tax relief from the British government.
The company said it was not prepared to comment until it had assessed the full ramifications of the ruling.
The UK Treasury said it welcomed the judgement, taking it to mean existing rules could continue.
But it added: "We accept that in a very small number of very limited circumstances the UK may have to allow relief."
It would consult businesses about how to rewrite the rules and publish fresh guidance "in due course", it said.
Who can claim?
Some 70 companies have come together to try and put a similar case to that raised by M&S.
But Mr Dodwell said that many of the companies - which include Ford, Lloyds TSB, Carphone Warehouse, ASDA and Toyota - will not be able to take advantage of the M&S ruling because they still have ongoing operations in Europe, and will need to claim tax relief on losses where they occur.
"Some groups may see their claims to relief for foreign losses fail," said Richard Baron, head of taxation at the Institute of Directors.
"But this is still a good result for British business."
Bill Dodwell said it was a "common sense ruling".
"It will lead to some small tax rebates, but governments won't be paying out billions."
Germany, Greece, France, Ireland, the Netherlands, Finland and Sweden had all backed Britain's case, fearing that they could have to pay back huge tax rebates.