LONDON — Queen Elizabeth II urged the British people in a rare televised speech Sunday to show their self-discipline and quiet resolve during the coronavirus pandemic that has taken nearly 5,000 lives here. Soon after the evening broadcast ended, a spokeswoman for Boris Johnson said the prime minister had been admitted to a hospital because he suffered from "persistent" symptoms of the virus.

Johnson tested positive 10 days ago and had been self-isolating at his official residence since then.

“This is a precautionary step,” said the spokeswoman, who by long-standing protocol is not named. She said the 55-year-old prime minister still had a high temperature. 

Johnson, one of the first world leaders to be diagnosed with covid-19, had continued to work and lead cabinet meetings via teleconference from his flat, aides said. He has posted short videos on Twitter urging Britons to remain indoors except to go shopping, visit the doctor or exercise. In his most recent video, on Friday, he looked ragged, with puffy eyes and pale skin; he said then that he had one symptom — the temperature — and would continue in self-isolation.

The spokeswoman did not offer more details on why Johnson was admitted to the hospital — whether it was for further tests, such as chest X-rays, or to spend the night. Friends and political foes expressed sympathy and wishes for a speedy recovery.

The news of his hospitalization broke an hour after the queen broadcast her prerecorded message to the United Kingdom and Commonwealth — only the fifth such speech in her 68-year reign.

“We should take comfort that while we may have more still to endure, better days will return,” she said. “We will be with our friends again, we will be with our families again, we will meet again.”

The four-minute speech, coordinated with 10 Downing Street, was intended to rally national resolve through an outbreak that had taken the lives of 4,934 people in Britain as of Sunday evening. Buckingham Palace described it as “a deeply personal message . . . reflecting [the Queen’s] experience in other difficult times.”

In her remarks, she referred to her first radio broadcast in 1940, when as a 14-year-old princess she spoke to console children who were being taken from London to the countryside to escape bombing by the German Luftwaffe.

On Sunday evening, she spoke of “an increasingly challenging time. A time of disruption in the life of our country: a disruption that has brought grief to some, financial difficulties to many, and enormous changes to the daily lives of us all.”

She thanked the front-line health-care workers and all who were doing essential jobs. She thanked, too, those who were staying at home — “thereby helping to protect the vulnerable and sparing many families the pain already felt by those who have lost loved ones.”

“I hope in the years to come everyone will be able to take pride in how they responded to this challenge,” the queen said. “And those who come after us will say that the Britons of this generation were as strong as any. That the attributes of self-discipline, of quiet good-humored resolve and of fellow-feeling still characterize this country.”

She spoke without flourish. The rhetoric was not soaring but solid. Many said they were moved when the 93-year-old monarch and great-grandmother promised, “we will meet again.”

But Health Secretary Matt Hancock didn’t sound so proud on the morning talk shows, where he warned Britons that unless they all took the order to remain mostly indoors seriously, then the government might ban outdoor exercise — as governments in France, Italy and Spain have done.

Britons have been told to stay inside their homes except for infrequent trips to buy food and medicine, to visit the doctor, to do essential work or take an hour or less of exercise outdoors.

On Sunday, with the skies a sunny blue and temperatures soaring to the low 70s, Britain’s great outdoors — from the countryside to the beaches to the city parks — were filled not just with walkers, bicyclists and joggers, but with picnickers and sunbathers sprawled on lawns.

“If you don’t want us to have to take the step to ban exercise of all forms outside of your own home, then you’ve got to follow the rules,” Hancock implored the citizenry via the BBC.

He said most Britons were adhering to the guidelines, but the ones who aren’t might ruin it for all.

Hancock has tested positive for the virus. On Sky News, he sounded more heated: “It’s quite unbelievable, frankly, to see that there are some people who are not following advice.”

Hancock said the guidance for Britain’s version of a lockdown couldn’t be more “crystal clear.” He repeated the admonition that staying at home protects the National Health Service and saves lives — an advisory that became more grim a few days ago when the government released a new ad campaign: “If you go out, you can spread it. People will die.”

Despite Britain's strict social distancing rules, videos on social media from April 3-5 showed people crowding sidewalks and sunbathing in the park. (The Washington Post)

British public health officials worry the public will cease to maintain the extreme social distancing needed to “flatten the curve” that shows soaring numbers of new infections here.

Sunday also saw the publication of photographs revealing that Scotland’s chief medical officer, Catherine Calderwood, flouted her own warnings to the public by traveling not once but twice to her holiday home on the beach during the lockdown. Police took the extraordinary step of issuing her a warning.

The queen’s address was taped at Windsor Castle, where the world’s longest-serving monarch is living in partial isolation with her 98-year-old spouse, Prince Philip.

To protect her, the palace reported, she was filmed by a lone cameraman, who kept six feet away and wore protective equipment. All other technical staff assisted from another room.

While the queen’s Christmas Day message is an annual broadcast event, she has addressed the country in this way only four other times in her long reign: on her Diamond Jubilee in 2012, on the deaths of the Queen Mother in 2002 and Princess Diana in 1997, and on the Gulf War in 1991.

The coronavirus has touched the queen’s immediate family. Her son Prince Charles, first in line to the throne, tested positive last month. He spent a week in quarantine at Birkhall, his royal estate in Scotland, and has recovered.