The UK terror threat level has been raised to its highest level of “critical”, meaning further attacks may be imminent, Theresa May has said.
The move came after investigators were unable to rule out whether Manchester bombing suspect Salman Abedi acted alone, the prime minister said.
Military personnel will now be deployed to protect key sites.
Twenty-two people were killed and 59 injured when a suicide bomber attacked Manchester Arena on Monday evening.
The prime minister said soldiers would be placed in key public locations to support armed police in protecting the public.
Military personnel may also be seen at other events over the coming weeks, such as concerts, Mrs May said, working under the command of police officers.
The prime minister said she did not want the public to feel “unduly alarmed” but said it was a “proportionate and sensible response”.
The highest threat level, which is decided by the Joint Terrorism Analysis Centre – a group of experts from the police, government departments and agencies – has only been reached twice before.
Met Police Assistant Commissioner Mark Rowley, who is the national counter-terrorism policing lead, said the investigation was “fast-moving and making good progress”.
“However, a critical line of inquiry is whether the dead terrorist was acting alone or part of a group,” he said.
“We still have critical lines of inquiry they’re chasing down which has led to a level of uncertainty.”
The first time the threat level was raised to critical was in 2006 during a major operation to stop a plot to blow up transatlantic airliners with liquid bombs.
The following year, security chiefs raised it once more as they hunted for the men who had tried to bomb a London nightclub, before going on to attack Glasgow Airport.
Former Salford University student Salman Abedi – understood to be a 22-year-old born in Manchester to parents of Libyan descent – is thought to have blown himself up in the arena’s foyer shortly after 22:30 BST on Monday.
Fans were beginning to leave a concert by US singer Ariana Grande.
Three of his victims have been named – Saffie Rose Roussos, eight, Georgina Callander – thought to be 18 – and John Atkinson, 28.
So-called Islamic State has said – via IS channels on the messaging app Telegram – it was behind the Manchester attack, but this has not been verified.
By Dominic Casciani, BBC home affairs correspondent
This is a major and very rare move by the UK’s security chiefs.
For the past few years, ministers, police chiefs and others have been at pains to try to warn the public that the threat faced by the UK was severe.
But they have steered clear of warning, even when a major plot was being tracked, that an attack could be close. This time, they feel they have no choice other than to say it may be imminent.
In short, nobody at this stage can say for sure whether Abedi acted alone or with the help of others. They can’t rule out if there are other people out there.
What does it mean for us, the public?
Some of us will see the Army in key locations that need guarding so that armed police can be freed to focus on policing rather than guarding.
We should expect additional time-consuming security checks at ports and so on.
The aim for security chiefs is to ratchet up the security while keeping the country moving.
The wounded, who include 12 children aged under 16, are being treated at eight hospitals across Manchester.
Several people are still missing, including Eilidh MacLeod, 14, from Barra in the Outer Hebrides, 15-year-old Olivia Campbell, Chloe Rutherford, 17, and Liam Curry, 19.
Eilidh’s friend, Laura MacIntyre, 15 – who was also reported as missing – was later identified as one of the seriously injured in a Manchester hospital.
Thousands of people turned out for the vigil in Manchester and to hold a minute’s silence to remember those who died.
Home Secretary Amber Rudd, Labour leader Jeremy Corbyn and Commons Speaker John Bercow stood on stage alongside Manchester Mayor Andy Burnham and Greater Manchester Police Chief Constable Ian Hopkins.
Vigils have been held elsewhere, including in Birmingham, where the event was interrupted after a man apparently armed with a large knife and a baseball bat was detained nearby.
The arena bombing is the worst terrorist attack in the UK since the 7 July bombings in 2005, in which 52 people were killed by four suicide bombers.
Witnesses at the arena described seeing metal nuts and bolts among the debris of Monday’s bomb, and spoke about the fear and confusion that gripped concert-goers.
Andy Holey, who had gone to pick up his wife and daughter, said: “An explosion went off and it threw me about 30ft from one set of doors to the other set of doors.”
Emma Johnson, who was waiting for her children, aged 15 and 17, said: “The whole building shook. There was a blast and then a flash of fire afterwards. There were bodies everywhere.”
Teenager Abigail Walker told the BBC: “I had to make sure I had my sister. I grabbed hold of her and pulled hard. Everyone was running and crying.
“It was absolutely terrifying.”