Boris Johnson is self-isolating after meeting an MP who later tested positive for Covid-19.
The PM was contacted by NHS Test and Trace on Sunday but is not showing symptoms, Downing Street said.
Mr Johnson spent about 35 minutes with Ashfield MP Lee Anderson who has since tested positive, BBC political correspondent Nick Eardley said.
In April, Mr Johnson spent three nights in intensive care after falling ill with the virus.
He later said it “could have gone either way” and thanked healthcare workers for saving his life.
In a statement, a No 10 spokesman said: “The prime minister has today been notified by NHS Test and Trace that he is required to self-isolate as a contact of someone who has tested positive for Covid-19.
“The prime minister will follow the rules and is self-isolating.
“He will carry on working from Downing Street, including on leading the government’s response to the coronavirus pandemic.
“The PM is well and does not have any symptoms of Covid-19.”
‘Timing couldn’t be worse’
Boris Johnson will now have to stay at home in No 10 for the next 10 days.
It means he will not be able to be in Parliament, though I’m told he will be working from Downing Street.
He does still intend to keep communicating with the country.
It was supposed to be a pretty big week for Boris Johnson – he is trying to reset his government after some factional fighting in his office over the last few days.
There are conversations taking place with the parliamentary authorities to see whether he can still contribute to the Commons.
I think it is fair to say this has not come at the best time for Mr Johnson: he has big decisions to make on Brexit and what happens when England’s lockdown ends on 2 December.
And it is also worth bearing in mind he was extremely ill with coronavirus earlier in the year and we do not know what getting the virus does for a person’s immunity.
Conservative MP Mr Anderson posted on his Facebook page to say he was self-isolating with his wife, who is clinically vulnerable.
‘Both feeling good’
“On Friday I lost my sense of taste at the same time my wife had a bad headache,” he said. “I had no cough, no fever and felt well. We both had a test on Saturday and the result came in Sunday morning.
“My wife and I both tested positive. I feel absolutely fine and my biggest concern is my wife who is in the shielded group.
“But we are both feeling good.”
On Thursday, Mr Anderson posted a photo of himself with Mr Johnson at No 10 alongside the words: “Breakfast with the PM.”
BBC political editor Laura Kuenssberg tweeted the news had come the night before what was meant to be a “big relaunch week”, following the row last week involving the PM’s chief adviser Dominic Cummings.
Mr Cummings left Downing Street for the last time on Friday following internal battles about his role.
Earlier this weekend, a senior Tory MP said Mr Cummings’ departure was a chance to “reset government”.
The UK government announced another 24,962 confirmed Covid cases on Sunday, as well as a further 168 deaths within 28 days of a positive test.