Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

LONDON — Britain’s Prime Minister Boris Johnson has tested positive for the coronavirus, he said in a tweet Friday.

He had developed "mild symptoms" in the last 24 hours and was "self-isolating," he said. "I will continue to lead the government’s response via video-conference as we fight this virus."

Over the last 24 hours I have developed mild symptoms and tested positive for coronavirus.



I am now self-isolating, but I will continue to lead the government’s response via video-conference as we fight this virus.



Together we will beat this. #StayHomeSaveLives pic.twitter.com/9Te6aFP0Ri — Boris Johnson #StayHomeSaveLives (@BorisJohnson) March 27, 2020

In a video accompanying his tweet, Johnson said he had "a temperature and a persistent cough," and had taken the test on the advice of Britain's Chief Medical Officer Chris Whitty.

"So I am working from home and I am self-isolating and that’s entirely the right thing to do, but be in no doubt that I can continue thanks to the wizardry of modern technology to communicate with all my top team, to lead the national fight back against coronavirus," he said.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Full coverage of the coronavirus outbreak

He went on to thank the police, teachers and the staff from the National Health Service, as well as the 600,000 people who had volunteered to help the public health system during the crisis.

"We will get through it, and the way we will get through it is of course by applying with the measures we have heard so much about," he said. "The more effectively we all comply with those measures, the faster our country can come through this epidemic and the faster we will bounce back."

It is not known whether he is staying with his fiancee, Carrie Symonds, who is several months pregnant.

A few hours later, Britain's Health Secretary Matt Hancock tweeted that he had also tested positive. He also said his symptoms were mild and that he was working from home and self-isolating.

Download the NBC News app for full coverage of the coronavirus outbreak

On Thursday, Johnson's government announced that another 115 people had died after testing positive for the virus, bringing the total number of deaths to 578. The number of confirmed cases rose to 11,658 from 9,529 the day before.

The country is on day four of a three-week lockdown announced by Johnson on Monday evening, when the prime minister ordered the closure of pubs and restaurants and told people to stay home unless absolutely necessary.

Although the number of cases and deaths in Britain is lower than in Italy, Spain and France, health officials and scientists have warned that the peak of the epidemic will hit in several weeks time.

Reuters contributed to this report.