Peace activist Brian Haw may have to end his five-year vigil outside Parliament as the government has won an appeal against an earlier legal ruling.
Brian Haw has slept in Parliament Square since 2001
Last July, Mr Haw, 56, from Worcestershire, won a High Court action against a new law threatening his round-the-clock protest.
But three Court of Appeal judges have now overturned that decision.
The government had introduced the legislation with the specific intent of forcing Mr Haw to abandon his post.
The Serious Organised Crime and Police Act 2005 states anyone wanting to demonstrate in a 1km zone around Parliament Square must have permission from the police when the demonstration starts.
Previously in the High Court, lawyers for Mr Haw argued that his demonstration had begun four years earlier and therefore he did not have to apply for authorisation.
The government said Mr Haw posed a potential security risk and described his argument as absurd, but judges ruled by a 2-1 majority in Mr Haw's favour.
But on Monday, the Master of the Rolls, Sir Anthony Clarke, Lord Justice Laws and Lady Justice Hallett overturned the decision and refused permission for him to appeal to the House of Lords.
Sir Anthony said: "Parliament intended to include demonstrations whenever they started.
"Any other conclusion would be wholly irrational and could fairly be described as manifestly absurd."
'Blow to free speech'
Mr Haw's solicitor is understood to have written to the police saying his client will not leave Parliament Square voluntarily.
Speaking from his makeshift shelter, Mr Haw, who was not in court, said: "They were completely and utterly wrong.
"This is such a farce. Security? I have been here five years keeping the security of Parliament. We are not the security risk, we are not the risk to the world, Bush and Blair are."
Mr Haw's supporters shared his anger at the decision.
The Stop the War Coalition said the decision was "another stab in the back" for democracy and spoke of its determination to continue peacefully protesting outside Parliament.
Civil rights pressure group Liberty said the ruling was a "blow to free speech".
Director Shami Chakrabarti said: "Unfortunately, today's judgment, and the law he (Tony Blair) passed, prove the right to protest is under severe threat in this country."
Since 2001, Mr Haw slept in Parliament Square among a large display of anti-war banners, placards and flags, many presented to him by well-wishers.
But such a permanent fixture proved an irritant to his neighbours in the House of Commons.
He often uses a loud-hailer to shout views at MPs and passers-by and his placard-strewn campsite, branded an eyesore by former Commons leader Peter Hain is visible to everyone entering the Commons, including Prime Minister Tony Blair.