The City of London Corporation has won its High Court bid to evict protesters from outside St Paul's Cathedral.
The demonstrators, who are campaigning against corporate greed, have been occupying the central London site since 15 October.
The corporation sought a possession order after the Occupy London group ignored an order to clear its tents from the public highway.
Occupy London will appeal in the Court of Appeal on Thursday.
The protesters will approach the appeal court after the High Court judge refused them permission to appeal but accepted they can renew their applications directly to the court.
Lawyers for the corporation agreed not to enforce the court orders until 16:00 GMT on 27 January, pending an appeal.
But a spokesman said the camp would not be moved before 31 January when a meeting will be held to "ratify any action".
John Cooper QC, for Occupy London, said: "The grounds of appeal are whether the injunction and actions taken by the corporation are proportionate in terms of what is happening outside the cathedral, in other words, whether they have gone over the top."
The barrister added that protesters could use the seven days to discuss "potential exit strategies" in case the appeal fails.
Ruling in the case, Mr Justice Lindblom said he had considered the obstruction to the highway caused by the camp, the rights of worshippers in the cathedral, planning considerations and the effect of the camp on visitors in the area.
He said any of these "powerful considerations" would individually have been sufficient to win the argument for the corporation.
"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 demand the remedy which the court's orders will bring," Mr Justice Lindblom said in the summary of the judgment.
"I am satisfied that the City had no sensible choice but to do what it has."
Addressing the protesters in the courtroom, the judge added: "Whilst I recognise that this outcome will be disappointing to the defendants, I wish to pay tribute to all who participated in the hearing for the courteous and helpful way in which they conducted themselves."
The Occupy London group tweeted after the ruling: "The justice system has decided to stir up the hornet's nest."
Lawyers for the protesters had argued that the courts must guard freedom of expression and assembly, which is enshrined in the European Convention on Human Rights.
But the corporation's legal team said they were not seeking the court orders to prevent lawful and peaceful protest, but argued that the right to protest did not justify a semi-permanent campsite on the public highway, especially one outside St Paul's Cathedral.
Stuart Fraser, the City of London Corporation's policy chairman, said: "We took this action to clear the tents and equipment at St Paul's.
"We hope the protesters will now remove the tents voluntarily. If not, and subject to any appeal proceedings, we will be considering enforcement action as soon as possible.
''Lawful protests are a regular part of City life but tents, equipment and increasingly, quite a lot of mess and nuisance, is not what a highway is for and the public generally is losing out - as evidence before the court made clear.''
Over the last three months human rights activist Rev Jesse Jackson, fashion designer Vivienne Westwood and musicians and several commentators have visited the camp.
Days after the camp was set up, St Paul's Cathedral closed its doors for the first time since World War II citing health and safety concerns.
Following its reopening top clerics in the cathedral, including the former dean Rt Rev Graeme Knowles and ex-canon Dr Giles Fraser, resigned as the corporation asked protesters to clear the site.
Dr Fraser, who was in the public gallery for the judgment, said the decision was "disappointing" and added: "The voice of protest needs continually to be heard. The church must not be seen to side with the 1% and against the 99%."
The Bishop of London, the Rt Rev Richard Chartres, said: "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."
Since October, the Occupy camp has expanded to Finsbury Square and protesters moved into an empty building owned by the Swiss bank UBS in Sun Street, east London, and to the empty Old Street Magistrates Court.
Elijah Olig, 18, from Australia, who has lived at the camp since 27 October said he would move to one of the other occupied sites.
"We have Finsbury Square and UBS, there are multiple places where we reside already. Whatever happens, we will do something positive.
"We've already achieved what we set out to accomplish, which is to get the conversation topic on people's tongues and raise awareness."
The campaign has received more than £39,700 in donations, of which £29,946 has been spent in running the protest, BBC London has learned.