Mr Justice Lindblom granted possession orders and injunctions to the City of London Corporation to evict the anti-capitalism protesters.

The judge said the City administration’s efforts to send the Occupy protesters packing was  “entirely lawful and justified”.

However, he also acknowledged the “sincerity and passion” of the protesters, who have set up 200 tents in the cathedral churchyard.

The protestors are likely appeal the decision – they have been given three days – which would delay attempts by the police to enforce the eviction order.

Justice Lindblom accepted that the St Paul’s Cathedral churchyard is a significant base for the group’s campaign, though he said the court was not there to judge their politics.

“Citizens are free to voice their disagreement with legislation passed by Parliament,” he said.

“But the High Court is the place for litigation not a forum for the debate of matters such as those.”

The Bishop of London, the Rt Rev Richard Chartres, who has previously urged the chapter of St Paul’s to dissociate itself from the legal action, said: “Whatever now happens as a result of today’s judgment, the protest has brought a number of vital themes to prominence.

“These are themes that the St Paul’s Institute remains committed to exploring and, now through London Connection, we want to ensure they continue to have a voice.

“Bishops cannot have all the answers to what are complex economic problems. What we can do, however, is broker communications and make sure that a proper connection between finance and its ethical and moral context is found.”

The decision today comes as the culmination of a five-day hearing last month.

The court heard the camp – which began on October 16 – had attracted unsavoury characters, such as drunks and criminals, and the area had become unsanitary and stinking as a result. This affected local businesses and worshippers.

Lawyers representing the protestors argued the case raised issues of “extreme public importance” and that the freedom of expression must be protected under human rights legislation.

More than 100 Occupy London protesters packed into the court as the judge handed down his ruling. The campaign group was recognised by the judge for being helpful and courteous throughout the hearing.

However, Justice Lindblom emphasised: “The freedoms and rights of others, the interests of public health and public safety and the prevention of disorder and crime and the need to protect the environment of this part of the City of London all demands the remedy which this court’s orders will bring.

“I am satisfied that the City had no sensible choice but to do what it has done.

“It gave the defendants ample opportunity to remove the protest camp without the need for time and money to be spent in legal proceedings. It has behaved both responsibly and fairly throughout.”

The legal proceedings started after protesters had ignored a November 17 deadline to clear the public highway.

For the first time since the Blitz, the cathedral was forced to close its doors. Tension over their occupancy also led to the resignation of Canon Chancellor Giles Fraser.