A judge rejected the councils' claim that the mayor's plans to close 10 fire stations were legally flawed for a number of reasons, including a failure to take into account the reality of increased fire risks in inner London.
Campaigners say the cuts, which involve the loss of more than 500 jobs and the axing of 14 engines, would be "reckless, wrong and will seriously endanger lives".
But Mr Justice Foskett ruled the process by which the closure decision was reached was lawful.
He said: "I appreciate that the outcome will come as a disappointment to a number of people who had hoped to see the proposed changes to the provision of fire services in their area set aside."
More top news
The 34-year-old from Coulsdon in Surrey died during the private party in Headley in the early hours of Monday, Surrey Police said.
The Home Office made the arrests at various restaurants across London on July 4.
Mayor of Newham Sir Robin Wales criticised the International Olympic Committee on the fourth anniversary of the opening ceremony.