The government has raised Britain's terror threat level from substantial to severe because of the threat from militant groups in the Middle East.
A severe threat means an attack is deemed to be "highly likely", but there is no intelligence to suggest one is imminent.
At a press conference in London, David Cameron said an attack was more likely because of the increased threat from militant groups in Iraq and Syria, where Islamic State (IS) have seized large swathes of territory.
The Prime Minister added the UK was in the midst of a "generational struggle" against a "poisonous ideology" and that IS posed a "greater and deeper threat to our security than we have known before".
"We could be facing a terrorist state on the shores of the Mediterranean and bordering a Nato member," he said, adding that Britain's security services believed at least 500 Britons have gone to fight in Syria and potentially Iraq.
The PM also announced new legislation that would make it easier to remove passports from people who may travel abroad to fight, adding that the Taliban had harboured and facilitated al Qaeda terrorism, but IS was effectively a state run by terrorists.
Meanwhile, the White House has said it does not expect to raise the US terror threat level.
Speaking before the PM's statement, Home Secretary Theresa May said: "The increase in the threat level is related to developments in Syria and Iraq where terrorist groups are planning attacks against the West.
"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. We face a real and serious threat in the UK from international terrorism.
"I would urge the public to remain vigilant and to report any suspicious activity to the police."
Police forces say they will increase their patrols in response to the raising of the terror threat, which is set by the Joint Terrorism Analysis Centre (JTAC).
The JTAC's decision comes amid growing concern about hundreds of aspiring British jihadis travelling to Iraq and Syria and the murder of American journalist James Foley
Haras Rafiq from counter-extremist think tank the Quilliam Foundation, said that IS terrorists may want to target high-profile gatherings in the UK.
"Next week we have a very important Nato conference in Wales. It would be right to suggest that ISIS may well want to target high-profile targets like that.
"The danger is also from a wider aspect in terms of European fighters. We talk about Britain having a large number of fighters out there, but per captia Belgium is the worst offender.
"The threat is not just from Britain it's from a wider European perspective."
Sky News police analyst Graham Whetton said the raised level would trigger increased policing levels and public alertness to suspicious activity.
"Police will contact transport hubs and sports stadiums and ask them to increase their vigilance and security checks. The airports will get the same threat level increase so they will be asked to raise their awareness and alertness.
"Police cannot have eyes and ears everywhere. Officers need communities and families to bring to their attention anybody they perceive may be vulnerable or in danger of escalating towards terrorism.
"That is a key piece of the anti-terrorism jigsaw, getting people to come forward with any information they may have."
Sir Bernard Hogan-Howe, the UK's most senior police officer, said Scotland Yard is ready for an influx in case large numbers of homegrown extremists return at the same time.
National Policing Lead for Counter-Terrorism, Assistant Commissioner Mark Rowley, said: "We need communities and families to bring to our attention anyone they perceive may be vulnerable, a danger or escalating towards terrorism.
:: Anyone with information is urged to contact the Anti-Terrorist Hotline on 0800 789 321.