David Cameron has announced new laws to crack down on terror suspects as he warned that extremism in Iraq and Syria poses a greater danger to Britain than al Qaida.
As the terrorist threat to the UK was raised from substantial to severe, the prime minister said legislation would be introduced so it was easier to seize jihadists' passports.
"What we are facing in Iraq now with Isil (Islamic State) is a greater threat to our security than we have seen before," he told a press conference in Downing Street.
Cameron said the intelligence and security services believed that at least 500 Britons had gone to fight in Syria and potentially Iraq.
Although he stressed that the Government had already taken steps to counter the threat of jihadists returning to commit atrocities, he said it had become clear that there was still a need to fill "gaps in our armoury".
He will be making a statement to Parliament on Monday, giving details. Cameron said the Taliban had harboured and facilitated al Qaida terrorism, but IS was effectively a state run by terrorists.
"We could be facing a terrorist state on the shores of the Mediterranean and bordering a Nato member," he added.
The gruesome murder of US journalist James Foley was "clear evidence - not that any more was needed - that this is not some far off (problem), thousands of miles away, that we can ignore".
Mr Cameron said: "In Afghanistan the Taliban were prepared to play host to al Qaeda, the terrorist organisation. With IS we are facing a terrorist organisation not being hosted in a country but seeking to establish and then violently expand its own terrorist state.
"With designs on expanding to Jordan, Lebanon, right up to the Turkish border, we could be facing a terrorist state on the shores of the Mediterranean and bordering a Nato member."
The statement came as the Joint Terrorism Analysis Centre (JTAC) raised the threat level from substantial amid fears over British jihadists returning from Iraq and Syria to carry out atrocities.
The change means a terrorist attack is considered "highly likely", although Home Secretary Theresa May stressed there was no specific intelligence.
"The increase in the threat level is related to developments in Syria and Iraq where terrorist groups are planning attacks against the West," Mrs May said. "Some of those plots are likely to involve foreign fighters who have travelled there from the UK and Europe to take part in those conflicts."
Speculation is mounting that the Government could bow to pressure for terrorism investigation and prevention measures (Tpims) to be beefed up. There have been calls for powers to impose "internal exile" on suspects, a key part of the old control orders regime, to be restored.
Mr Cameron said: "My first priority as Prime Minister is to make sure we do everything possible to keep our people safe...
"The ambition to create an extremist caliphate in the heart of Iraq and Syria is a threat to our own security here in the UK.
"The terrorist threat was not created by the Iraq war 10 years ago. it existed even before the horrific attacks on 9/11, themselves some time before the war.
"This threat cannot be solved simply by dealing with perceived grievances over Western foreign policy. Nor can it be dealt with by addressing poverty, dictatorship or instability in the region - as important as these things are.
"The root cause of this threat to our security is quite clear. It is a poisonous ideology of Islamist extremism that is condemned by all faiths and faith leaders."
Mr Cameron is set to push for more coordinated European action to track jihadists at a summit in Brussels this weekend.
The UK wants to revive a directive that would enable police and security services across the EU to share passenger records.
National leaders have signed off the arrangements - but they have stalled in the European Parliament after MEPs expressed concern about civil liberties and privacy.
Mr Cameron said the Government was taking a "tough, intelligent, patient and comprehensive approach" to the issues.
He stressed that there had already been significant steps, including making it easier to seize passports of suspected British jihadists, and emergency legislation to make communications data available to police and security services was "already delivering results".
But he warned that combating the extremist ideology would take "years and probably decades".
He also insisted that military action should not be ruled out completely - saying that "learning the lessons of the past does not mean there is not a place for our military".
Highlighting the danger of jihadists returning to Britain, Mr Cameron said the "scale of this threat is growing".
"I said very clearly last week that there would be no knee-jerk response," he said. "But we have to listen carefully to the security and intelligence officers who do so much every day to keep us safe."
He added: "It is becoming clear that there are some gaps in our armoury, and we need to strengthen them.
"We need to do more to stop people travelling, to stop those who do go from returning, and to deal decisively with those who are already here.
"I will be making a statement in the House of Commons on Monday.
"This will include further steps to stop people travelling, with new legislation that will make it easier to take people's passports away."
Also on HuffPost:
Suggested For You
SUBSCRIBE AND FOLLOW
Get top stories and blog posts emailed to me each day. Newsletters may offer personalized content or advertisements.Learn more