LONDON — President Trump and British Prime Minister Boris Johnson have prompted many comparisons over the years: as populists, as politicians who aren't afraid to offend, as people who play fast and loose with the facts. Now, they are a pair of world leaders with personal experience of the coronavirus.

But whereas Johnson spent weeks trying to fight off and then recover from the virus, Trump claims to have beat it in just days. Johnson came back to work urging patience and determination, describing the virus as an “invisible mugger” that must be wrestled to the floor with collective action. Trump returned to the White House on Monday night playing down the virus, declaring: “Don’t let it dominate you. Don’t be afraid of it.”

Here’s where their journeys overlapped — and where they diverged.

Leaders 'in good spirits,' even in the hospital

Trump and Johnson, and the spinners for both, played down their covid-19 symptoms and evaded questions about their status. The emphasis was on how they remained strong and positive and in charge.

On Friday evening, as Trump was headed to Walter Reed National Military Medical Center, press secretary Kayleigh McEnany said in a statement that he “remains in good spirits, has mild symptoms, and has been working throughout the day.” She maintained that hospitalization was “out of an abundance of caution, and at the recommendation of his physician and medical experts.” She added that the president would be working while there. (On Monday, McEnany revealed she tested positive for the virus, too.)

White House physician Sean Conley then gave a rosy pronouncement of the president’s status on Saturday — without disclosing that Trump had been given supplemental oxygen and put on a steroid reserved for severely ill coronavirus patients.

To illustrate that Trump was still engaged, the White House released two photos of the president, in different outfits and different rooms, with an array of folders and documents. “Nothing can stop him from working for the American people. RELENTLESS!” tweeted his daughter Ivanka Trump. Later it emerged that the photos had been staged 10 minutes apart and that Trump was signing a blank document.

A similar playbook was deployed by 10 Downing Street during Johnson’s bout with the coronavirus.

Johnson’s aides insisted he had mild symptoms and was working from his bed while self-isolating at his official residence. Even after being admitted to the hospital, Johnson said it was just for “some routine tests” advised by his doctor.

“I’m in good spirits and keeping in touch with my team, as we work together to fight this virus and keep everyone safe,” Johnson tweeted.

A day later, Johnson was in the intensive care unit. Still, Brits were told not to worry. His spokesman said the prime minister was “stable and in good spirits,” while getting “standard oxygen treatment.”

Johnson later conceded his condition was far more serious at that point, and “it could have gone either way” while he was in the ICU. His father Stanley Johnson later said his son “almost took one for the team.”

Johnson isolated, Trump didn't

Trump has come under criticism for failing to follow public health guidance throughout the pandemic and to keep himself away from other people while contagious. He flew to a fundraiser after knowing he’d been exposed. He invited staffers and photographers into his suite at the hospital. He enlisted the Secret Service to drive him past supporters outside. He removed his mask immediately upon his return to the White House. And he has mocked his election opponent, Joe Biden — and effectively other Americans — for taking greater precautions.

At the beginning of the pandemic, Johnson, like Trump, was cavalier about the virus. In early March, the prime minister boasted about shaking hands during an event at a hospital. As most of Europe imposed lockdowns, Johnson resisted. But his attitude had begun to shift before his diagnosis, as Britain was hit hard. He announced a national lockdown on March 23, urging people to “stay at home, protect our NHS and save lives.” On March 26, the night before he disclosed his positive result, he stood at a distance from Chancellor Rishi Sunak outside their Downing Street apartments, as they joined a national round of applause for health workers.

That was the last time Brits would see their prime minister in public for a month. After testing positive, Johnson posted a video message saying: “I’m self-isolating. And that’s entirely the right thing to do.” For 10 days, he sequestered himself in his apartment and had his meals left on a tray outside his door. When he went to the hospital, there were no reports of visitors, and he didn’t venture out into public.

The difference in behavior may help explain different public responses to Trump and Johnson’s illnesses. Johnson’s popularity ratings this year peaked during the week he left the hospital, reaching a high of 60 percent, according to a YouGov survey. By contrast, Trump’s approval rating is stuck in the low 40s, and a CNN poll found that two-thirds of Americans say he was irresponsible in how he handled the risk of coronavirus infection to others around him.

Presidential treatment vs. 'call me Boris'

When Trump was hospitalized, it was at a military facility with a dedicated presidential suite, with a dining room and offices. He was given supplemental oxygen, along with the antiviral medication remdesivir, the steroid dexamethasone, and a cocktail of lab-made antibodies that fewer than 10 other patients have received outside of clinical trials.

When Johnson was sick, much earlier in the pandemic, there were fewer treatments to try. He went to a public London hospital, where a nurse recalled the prime minister insisted on being called “Boris.” The staff said they treated him like any other patient — though he certainly had a large and devoted medical team. After his release, he offered particular praise to two nurses, Jenny McGee from New Zealand and Luis Pitarma from Portugal, who stayed by his bed for 48 hours while he was receiving supplemental oxygen. And he paid tribute to two intensive care doctors — Nick Price and Nick Hart — by subsequently giving his newborn son the middle name Nicholas.

Johnson was in the hospital for a week. Trump pushed for release after three days, though extensive medical support will remain available to him at the White House.

Johnson eventually handed over power, Trump held on

A looming question has been whether Trump might transfer power to Vice President Pence for any period, under the 25th Amendment. Trump administration officials said last weekend there were no plans for Pence to assume authority.

Who would lead the government was a pressing question in Britain, too — all the more so, because the rules in the country are not straightforward. There is no one with the title “deputy prime minister.”

Ultimately, when Johnson was admitted to intensive care on April 6, he asked Foreign Secretary Dominic Raab to “deputize for him where necessary.”

Raab, a Johnson loyalist, repeatedly played down his authority during those weeks he carried out the prime minister’s roles. Raab said he’d been given “very clear instructions” by Johnson and that there was “total unity” among the government’s top team.

Johnson wouldn’t return to work until April 27, after a period convalescing in the countryside. He was absent for the spring peak of the coronavirus in Britain and for most of the national lockdown he ordered. More than 21,000 people in Britain died of the virus and nearly 4 million workers were furloughed while Johnson was sick and struggling to get well.

Politically, he could afford to take time to recover. Trump, a month away from an election, probably feels more pressure to be back on the job and out campaigning as soon as possible.

Learning from the virus — or not

Both Johnson and Trump have said that getting covid-19 influenced their understanding of the disease — though Johnson saying so in the early months of the pandemic may have left a different impression than Trump saying it after more than 200,000 Americans have died. “I understand it. And it’s a very interesting thing, and I’m going to be letting you know about it,” Trump said in a video message on Sunday.

The takeaway Trump seems to want to emphasize is that the virus is overblown. “One thing that’s for certain: Don’t let it dominate you. Don’t be afraid of it. You’re gonna beat it,” he said upon his return to the White House.

He suggested he would resume the big, packed campaign rallies he’d been holding.

“I look forward to finishing up the campaign the way it was started and the way we’ve been doing — the kind of numbers we’ve been doing,” he said in another video message.

The jocular tone is very different from that used by Johnson, who has emphasized the need to take the virus — the “invisible mugger” — seriously.

After his days in the ICU, Johnson launched a national anti-obesity campaign, suggesting that he was more susceptible to the virus because “I was too fat.” On Tuesday, he noted that he’d lost 26 pounds.

Johnson’s government has struggled with consistent messaging and failed to deliver on its promises about testing and contact tracing. Johnson also fueled public anger when he refused to abandon his chief adviser who flouted stay-at-home orders. But he remains committed to the notion that getting control over the virus requires collective sacrifice.

Some of harshest criticism of Johnson these days comes from members of the libertarian wing of his Conservative Party, who worry that the English bulldog has become the whipped dog, intimidated by ­nanny-state medicos and fearmongering epidemiologists. They want the old jolly Johnson back.

Johnson told BBC’s Andrew Marr on Sunday, “I think the reality is this is a government that is facing an unprecedented crisis and I think if people wanted me to approach it with the sort of buoyancy and elan and the qualities I usually bring to things, I think people would think that was totally inappropriate.”