The court of appeal has reserved its judgement on whether peace protesters can be evicted from Parliament Square.
They were ordered to leave Parliament Square Gardens by a High Court judge last week but allowed to remain until the appeal.
London Mayor Boris Johnson had taken legal action to evict the demonstrators.
The judges said they hoped to give their decision next week and allowed the protesters to stay until then.
The group is protesting about several issues, including the Afghanistan war.
They have transformed the green in central London with tents and flags and called it Democracy Village.
The panel of three judges heard from Jan Luba QC, representing one of the peace camp factions, who said London Mayor Boris Johnson had no right to evict the protesters because he does not own the land, it belongs to the Queen.
He said the mayor failed to prove any legal title to the land and High Court judge Mr Justice Griffith Williams was wrong to find that he could reclaim it.
"The claimant cannot at will exclude the world from entering or remaining on Parliament Square Gardens and cannot bring possession proceedings," Mr Luba said.
Mr Luba also argued that even if the mayor could bring the proceedings, a court could not order possession because it would be incompatible with laws relating to rights to free speech and assembly.
Attracting homeless people
Ashley Underwood QC, representing the mayor, said Parliament Square Gardens was an open space which the public have a right to use subject to the control of the mayor and to the Trafalgar Square and Parliament Square by-laws.
Mr Justice Griffith Williams had ruled that the mayor had the power to exclude the demonstrators and had reached a reasoned decision, Mr Underwood added.
He said there was a pressing social need not to permit an indefinite camped protest on the site for the protection of the rights and freedoms of others to access.
The judge also said there was a need to protect health - the camp has no running water, toilets and is attracting homeless people because of the lack of control.