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 also confirmed the government had triggered “Operation Temperer”, a long-standing emergency plan to put soldiers into 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, and would work 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”.
She said the government would take “every measure available to us” to help the police protect the public.
“The spirit of Manchester and the spirit of Britain is far mightier than the sick plots of depraved terrorists.
“That is why the terrorists will never win and we will prevail,” she said.
The highest 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.
The first occasion 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.
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.”