London residents have lost their court battle to prevent the government placing surface-to-air missiles on the roof of their apartment block during the Olympics.
Residents of the Fred Wigg Tower, near the Olympic Park in east London, fear it could make them the target of a potential terrorist attack.
But a High Court judge ruled on Tuesday (local time) that the occupants of the 17-storey building, one of six sites where missiles will be stationed from mid-July until the end of the Games, did not have an arguable case.
Residents had expressed "shock, anxiety and worry" over the prospect of missiles being stationed at the tower, but had been under "something of a misapprehension" about the risks deployment would bring, said Judge Charles Haddon-Cave.
"It is clearly necessary to protect the Olympic Park from potential terrorist attack both from the air and the ground," he added.
"The first duty of government is to defend the realm and to protect national security, including by protecting the public from terrorist attack."
He agreed with the Ministry of Defence (MoD) that a tower block was an appropriate site to base missiles during the Games, which open on July 27.
The MoD welcomed the decision, saying the missiles were "an essential part of the multi-layered air security plan".
"We have always said we are planning for the worst-case scenario, not the most likely scenario," an MoD spokesman said.
"We acknowledge that the deployment, albeit temporarily for the Games, of military equipment and personnel can be unsettling, particularly where the community may not be used to a military presence.
"We will continue to engage with local communities to provide reassurance and reduce any impact on residents as far as possible."
The residents' solicitor Martin Howe said outside the court that he was "very disappointed" with the decision and would have to explain to his clients "that by this Friday, missiles will be on their roof".
A decision will then be made on whether to appeal against the ruling, Howe said.
Rapier and high velocity missile systems will be installed at six locations from mid-July and will remain there throughout the Games, the MoD has said.
Other steps being taken to protect the Olympics include mooring a helicopter carrier in the River Thames and stationing RAF Typhoon jets and Puma helicopters on the outskirts of London.
Britain's biggest-ever peacetime security force of more than 40,000, backed by a huge intelligence operation, will also guard venues, athletes and the millions of visitors expected to throng the British capital.
The MoD has said the missiles would only be used in the event of "specific orders from the highest levels of government in response to a confirmed and extreme security threat."