A man who has held a four-year anti-war protest outside Parliament, has won a legal battle to continue his vigil.
Mr Haw has been protesting outside Parliament since 2001
From 1 August all protests in a half-mile zone in Westminster, London, must have prior permission from police.
But the High Court has ruled Brian Haw, 56, from Worcestershire, who claimed he was exempt as his protest pre-dated the new laws, can continue his protest.
The government said Mr Haw posed a potential security risk and described his argument as "absurd".
Lawyers for Mr Haw said his demonstration had begun four years ago and therefore he did not have to apply for authorisation, even though the law was actually targeted at him.
Home Office lawyers accepted the original drafting of the 2005 Serious Organised Crime and Police Act, which was passed in April, was flawed.
The court heard the Home Office attempted to correct the flaws in June through an order which stated the law applied to all demonstrators whether starting or continuing their protests.
But on Friday judges ruled by a 2-1 majority that secondary legislation could not be used to catch Mr Haw, who sleeps in the square in front of a large display of anti-war banners, placards and flags.
They also granted a declaration that Mr Haw is not required to seek authorisation to continue his protest.
Lady Justice Smith, sitting with Mr Justice McCombe and Mr Justice Simon, said the new law did not catch Mr Haw because of a drafting error.
She said she was surprised that it had been suggested that such an order could be used "to criminalise conduct which would not otherwise be criminal".
"If Parliament wishes to criminalise any particular activity, it must do so in clear terms. If it wishes to do so, Parliament can amend this Act," she added.
Outside court, Mr Haw said he would continue his demonstration for as long as it takes.
"I am gutted because people are still dying. Politicians have gone on holiday. The noble lady and gentlemen who delivered this good verdict today are going off for a well-deserved break, but the people of Iraq, Afghanistan and Palestine are still dying in these war-torn countries.
"It has got to stop. I can't stop until that stops," he said.
His solicitor David Thomas added that the ruling was likely to cause embarrassment to the government.
He said: "We are very happy that the court has upheld the very important principle that, if you are legislating for a criminal offence, you have to be absolutely clear about what you are doing."