Heathrow operator BAA today won its High Court bid for an injunction aimed at preventing unlawful conduct at an environmental protest at the airport.
The order was granted by Mrs Justice Swift, sitting in London.
BAA denied that it was seeking to prevent five million people using roads and public transport near the west London airport - the injunction was only aimed at "protesters" acting unlawfully.
The company said its legal action over the Camp for Climate Action, planned for August 14 to 21, was aimed at protecting the airport and the safety of passengers and staff "against the planned direct action by environmental activists".
Mrs Justice Swift ruled today that the only way to prevent potentially " serious and damaging" consequences of any unlawful direct action was to grant an injuction
Mrs Justice Swift said: "I am satisfied that the terms of this injunction are no wider than necessary to provide proper and effective protection to the claimants."
The order was nothing like as wide-ranging as that originally sought and should not affect the peaceful and lawful activities of those taking part in the protest.
The order was aimed at a group of persons intent on disrupting the operations of the airport and the lawful activities of those using it.
The injunction would allow those concerned with security to concentrate on protecting the airport from the risk of terrorist attack.
The judge said there was a risk that "a terrorist group may use the disruption caused by the protesters to perpetrate a terrorist act".
Organisers of the camp said thousands of people would gather near Heathrow Airport later this month for eight days of education, sustainable living and direct action against the "root causes" of climate change.
Last year's Camp for Climate Action was held in the shadow of Drax power station in Yorkshire.
Organisers said the power station was the UK's largest single emitter of carbon dioxide.
They chose Heathrow after complaining that the effect of the airport's planes on the climate is equivalent to 31 million tonnes of CO2 emissions a year.
Spokeswoman Lindsey Harris said last month that the camp at Heathrow was aimed at opposing the "lunacy" of the Government's airport expansion plans.
"All our efforts to tackle climate change are undone by operations like Heathrow. It's time to get serious. Instead of expanding airports, we should be talking about closing them," she said.
The group said the camp would have disrupted the activities of the airport and the aviation industry, but in the interests of public safety, there were no plans to blockade runways.
During the hearing last week, BAA's solicitor Tim Lawson-Cruttenden stressed that "we are only injuncting those who wish to act unlawfully" and there was "nothing to stop anyone from coming to the airport if they wish to act lawfully".
BAA was also seeking to "facilitate lawful protest" on its land, he said, and had designated three protest areas to ensure that those attending the camp could do so without infringing its by-laws.
Nicholas Blake QC, for a variety of defendants, questioned the need for the proceedings as three of the named individuals had offered undertakings as to trespass and nuisance and the fourth was away on holiday with her children during August.
He argued that there were "vast" police powers to prevent disorder and threats to the security of the public and airport users and there could not be an injunction "against the world at large against persons unknown ".
He described the injunction application as an "exercise in confusion and futility".
The judge adjourned the case until this afternoon to enable the final terms of the order to be drawn up.
It is understood that the injunction will not prevent members of most of the protest groups involved using roads and public transport in the vicinity of Heathrow.
One of those at whom the injunction was aimed was John Stewart, chairman of Heathrow airport anti-noise group Hacan and also chairman of the umbrella body AirportWatch.
He said after the verdict: "BAA had asked for the mother of all injunctions. They have received the mother of all setbacks."
Outside the court, a BAA spokesman said the company had "no option" but to take legal action.
He added that with persistent terrorist threats, "keeping Heathrow safe and secure is a very serious business".
To cause disruption at the airport was "irresponsible and unlawful" .
AirportWatch spokesman Peter Lockley said that all protesters, except the Plane Stupid organisation, would now be allowed to attend the Camp for Climate Action.
He said: "This is a limited injunction. People engaged in peaceful activity will be allowed to protest.
"We are not talking about any kind of violence. AirportWatch does not engage in direct action."