Ministers have been urged not to rush through heavy-handed and illiberal anti-terror legislation following the murder of James Foley, after Boris Johnson was condemned for proposing that Britons who travel to Syria and Iraq should be presumed guilty until proven innocent.

Dominic Grieve, who was Attorney General for four years until he was sacked in David Cameron’s last reshuffle, described the Mayor of London’s proposal that the presumption of innocence be reversed for Britons travelling to the region as “draconian.”

“The first question I would ask is, what is the real necessity for this? We have successfully prosecuted a number of individuals coming back from Syria having engaged in terrorist activities or training,” he told the BBC.

“If we were to do this we would be undermining our own values and ultimately because this is a values battle that is not likely to be helpful in persuading people not to become terrorists.”

Mr Grieve added that the spectacle of the US journalist Foley being murdered on video - apparently by a British jihadist - did not mean there had been a “significant shift” in the problem the UK has with “a very small minority” of home grown terrorists.

The Mayor’s comments, in an article for the Daily Telegraph, reflected a frustration felt by Conservative and Labour MPs that the government is failing to tackle the problem posed by the few hundred young Briton men who have made their way to the Middle East to take part in the fighting.

The police are believed to be close to positively identifying “Jihadi John”, the masked killer who appeared on the video recording of James Foley’s murder, speaking with an English accent.

One of the prime suspects is Abdel-Majed Abdel Bary, a rapper from Maida Vale, in west London, whose father, Adel Abdul Bary, is awaiting trial in the USA on terrorist charges. The son has previously posted a picture on his Twitter account showing himself holding the severed head of an enemy fighter.

Intelligence experts fear that if Isis is defeated militarily, militants who have gone out to join the fighting will come back to the UK and pose a terrorist threat. There are limits to what the government can do to restrain them if they cannot be proved to have broken British law.

Mr Johnson suggested reinstating control orders, introduced by Labour in 2005, which enabled suspects to be replaced under close supervision, but which were replaced in 2011 by the less strict Terrorism Prevention and Investigation Measures, or TPims. And he backed an idea put forward by the Tory MP David Davis, a former shadow Home Secretary, that the government should consider depriving jihadists of their British citizenship.

But Mr Grieve said that doing so would breach a UN convention banning governments from rendering their own citizens stateless, and warned that if the government were to do it, the UK might not be able to deport foreign criminals in future because other countries would refuse to accept them.

The warning was backed by Labour’s shadow Home Secretary, Yvette Cooper, who said that international law was there “for a good reason.”

Nick Clegg also insisted that the police and border authorities are coping with the problem of British jihadists. Speaking in India, the Deputy Prime Minister said: “With the greatest respect to Boris Johnson, I will listen to what they tell me they need rather than what he says.