The UK will go into full lockdown on Monday evening with the British public allowed to leave their homes only to buy food, medicine, or do essential work.
Prime Minister Boris Johnson announced the decision after a surge in coronavirus cases suggested that the UK was just two weeks behind the level of outbreak in Italy.
"From this evening, I must give the British people a very simple instruction - you must stay at home," Johnson said in a televised statement from his Downing Street residence.
The prime minister announced that from Monday evening, the British people would be allowed to leave home for only the following "very limited purposes":
To ensure that the lockdown is obeyed, Johnson also announced he would close all shops selling "nonessential goods," as well as playgrounds, libraries, and places of worship.
He also announced:
The new rules will be enforced by the police with fines imposed on those who refuse to comply, the prime minister said.
Johnson last week closed the UK's schools, pubs, restaurants, gyms, cinemas, and theatres.
The prime minister said all in-person social interactions had to come to an end to beat the virus.
"You should not be meeting friends," he said. "If your friends ask you to meet, you should say, 'No.' You should not be meeting family members who do not live in your home."
Johnson's decision followed a weekend in which images of British people defying his government's advice to stay at home were shared widely on social media and in the British press.
He said the country would "come through stronger than ever."
"We will beat the coronavirus, and we will beat it together. And therefore, I urge you at this moment of national emergency to stay at home, protect our NHS, and save lives," he added.
Scottish First Minister Nicola Sturgeon described the measures as "difficult and unprecedented."
She added: "I am not going to seek to sugarcoat it in any way. This is for the protection of each and every one of us. Stay at home."
-UK Prime Minister (@10DowningStreet) March 23, 2020
Johnson's political opponents cautiously welcomed the announcement.
Labour Party leader Jeremy Corbyn said: "The Prime Minister is right to call for people to stay at home, protect our NHS and save lives. This is the right response to the coronavirus pandemic, and one we have been calling for.
"There now needs to be clear guidance to employers and workers about which workplaces should close - and the Government must close the loopholes to give security to all workers, including the self-employed, as well as renters and mortgage holders.
"We welcome these moves and will be working to ensure everybody has the protection and security they need."
The announcement came after multiple reports that the prime minister had been under intense pressure from within his government to bring forward a full UK lockdown amid surging numbers of cases across the country.
One senior government source told The Times of London on Monday that a lockdown was "inevitable."
"The prime minister will have the full support of the Cabinet and the country at large if he goes ahead with this," the source said. "It is inevitable - you just have to look at other countries. The sooner you do it the better."
The latest data shows that the UK is about two weeks behind Italy in terms of its coronavirus death toll, with the rate of increase slightly ahead of where Italy was at this stage.
The UK government's response to the crisis has taken heavy criticism in recent days, with the normally supportive Times newspaper leading with an editorial castigating the prime minister on Monday and comparing his slow response to former Prime Minister Neville Chamberlain's appeasement of Nazi Germany.
BuzzFeed News also reported that Johnson would have faced a "full-scale mutiny" from his own cabinet if he had failed to act.