Tens of millions of pounds of taxpayers' money is likely to have been saved after a ruling on hefty compensation claims over the 2011 London riots.
Five Supreme Court justices ruled that Boris Johnson should not have to foot costs for lost profit and rent incurred by Sony when the company's warehouse in Enfield, north London, was torched five years ago.
More than 1.5m CDs were destroyed in what lawyers called "the largest ever arson attack in Europe".
But the judges today concluded that the mayor's office - which funds the Metropolitan Police - should not be forced to pay any compensation.
A lawyer involved in the case said the decision could have saved taxpayers more than £80 million.
The dispute centred on the provisions of an old piece of Victorian legislation - the 1886 Riot Damages Act.
Johnson asked for a Supreme Court ruling following hearings both in the High Court and Court of Appeal.
Judges were told that the 19th-century law said compensation for "damage by riot" should be paid out of police funds.
A number of insurance companies argued that the destruction and looting of the Sony warehouse fell into that category but the London mayor disagreed.
Back in January, a High Court judge ruled against Johnson and said that the Sony warehouse was damaged during "widespread civil disorder".
Mr Justice Flaux claimed losses had arisen out of damage caused by "persons riotously and tumultuously assembled" and should be paid for out of police funds.
But he decided that there was a limit to liability - and said "consequential losses", including loss of profit and rent, were not "in principle recoverable".
Insurers challenged his decision on the "extent of liability" and the Court of Appeal ruled in their favour.
Appeal judges concluded that legislation provided a right to compensation for consequential loss.
But the Supreme Court overturned that appeal court decision - after analysing argument at a hearing in January - in the wake of a challenge by Mr Johnson.
They concluded that the Riot Damages Act did not "extend to cover consequential losses".
Chris Owen, head of disputes at law firm TLT, which represented the Metropolitan Police at the Supreme Court hearing, said the ruling would save millions of pounds of taxpayers' money.
"With many claims for consequential loss dependent on the outcome of this case, today's Supreme Court decision will likely save the UK taxpayer upwards of £80 million," he said.
"The law was unclear in this area and largely written for a different era.
"The Supreme Court ruling today has clarified that the compensation payable by the Metropolitan Police is limited to the costs of repairing the damage done to property during the 2011 London riots."
He added: "The legislation is in the process of being updated."
The warehouse was destroyed late on August 8 2011 during rioting in London and other parts of Britain after a man was shot and killed by police in Tottenham, north London, judges had heard.