Democratic vice-presidential nominee Kamala D. Harris canceled her travel through this coming weekend after two people who were around her tested positive for the coronavirus , the campaign said Thursday, another twist in a race that has been repeatedly shaken by the global pandemic.

A person who recently flew on the same plane as Joe Biden also tested positive, the campaign said, but that individual was never within 50 feet of the former vice president, who is not taking any additional steps to isolate himself.

Harris, a senator from California who had stepped off the campaign trail to participate in confirmation hearings for Supreme Court nominee Amy Coney Barrett, tested negative for the virus Wednesday and Thursday, the campaign said.

Harris has not been in close contact recently with either communications director Liz Allen or the other person around her who tested positive, a flight attendant who is not a campaign staff member, an aide said.

The Post’s Anne Gearan explains how President Trump and Democratic presidential nominee Joe Biden take opposite approaches to campaigning during a pandemic. (The Washington Post)

Harris took the opportunity to stress that the Biden campaign is following public health recommendations.

“We wanted to make sure that we were adhering to what has been, I think, a very appropriate and strict level of seriousness around the caution that we are exercising to make sure everyone is safe,” Harris said during a virtual fundraiser Thursday afternoon. “Obviously, it’s been in stark contrast to you know who.”

The apparent reference to President Trump was part of a broader attempt by the campaign to use the revelations to draw a contrast with Trump’s handling of the recent coronavirus outbreak at the White House. Trump, who announced on Oct. 2 he’d contracted the virus, has disregarded the advice of public health officials on wearing face masks and avoiding large gatherings.

Biden said the person who traveled on his plane to Ohio and Florida this week was never near him, and his doctor concluded there was no need for him to quarantine.

“Not only was the individual 50+ feet away and wearing a mask, but I was wearing an N-95 mask,” Biden tweeted. “No members of my staff were in contact with this crew member either.”

The decision for Harris to leave the campaign trail was made “out of an abundance of caution,” said Biden campaign manager Jen O’Malley Dillon. She added that even while staying put, Harris will keep “a robust and aggressive schedule of virtual campaign activities to reach voters all across the country during this time.”

The announcements were the latest jolt to an already unprecedented campaign, as the Democratic running mate now joins Trump in having been sidelined from the campaign trail for at least a short period during the final stretch of the race.

The news, which caught some close Biden allies by surprise, reflects the perils of trying to campaign during a pandemic, even with strict safety protections in place. The results could muddy the Biden campaign’s message that Trump’s recent coronavirus infection, along with that of several people in his close orbit, is a direct result of his reckless disregard for public health recommendations.

But the Biden campaign was at pains Thursday to draw a distinction between its behavior and that of Trump and his team. The Biden campaign immediately revealed who tested positive and when, disclosed details of Harris’s last negative test and quickly announced that it was conducting contact tracing — all at variance from the approach of the White House after Trump’s diagnosis.

“This is the sort of conduct we have continuously modeled in this campaign,” O’Malley Dillon said, regarding the suspension of Harris’s travel.

Aides signaled that the campaign was not planning to make any major changes as a result of the diagnoses. “Our protocols are how we identified positive cases. They worked, and we’ll continue to use them,” said Biden press secretary TJ Ducklo.

Trump told Fox Business on Thursday that he is not being tested for the virus daily, despite previous White House suggestions that he was. “I’m tested — not every day, but I’m tested a lot,” he told host Stuart Varney.

At a news briefing in late July, White House press secretary Kayleigh McEnany said of the president, “He’s tested more than anyone, multiple times a day.”

During the Fox Business interview, Trump said he has “lost five friends” to covid-19. He also said his son Barron, whose positive diagnosis was revealed by first lady Melania Trump on Wednesday, is doing “great,” adding, “He’s young and he’s strong.”

Harris had been scheduled to visit North Carolina on Thursday, Ohio on Friday, Pennsylvania on Saturday and Texas on Sunday — the start of an all-out travel blitz for the vice-presidential nominee who previously was traveling only a few days per week. In an attempt to salvage the potential outcome of the scheduled trip to North Carolina, the campaign scheduled a virtual event for voters in the state Thursday night.

“I will be transparent with you about any test results that I do receive,” the senator tweeted. “In the meantime, remember: wear a mask, practice social distancing, and wash your hands regularly. It is possible to stop the spread.”

Explaining how the virus entered Harris’s circle, the campaign said Allen and a nonstaff flight attendant took time off to attend personal events in the past week, and were tested before returning to work, in accordance with campaign policy.

It also said both were on a flight with Harris last Thursday, a day she spent campaigning with Biden in Arizona. The campaign said that Harris and the two people wore N95 masks on that flight and that “she was not within 6 feet for more than 15 minutes with either of them.”

“As such, she does not meet the CDC definition of ‘close contact’ for exposure,” O’Malley Dillon wrote. Both people tested negative directly before and after the flight, according to the campaign.

Harris has not had in-person contact with Allen since last Thursday, a campaign aide said. Harris flew to Washington on Friday and has not flown since then, as she was preparing and then participating in Barrett’s nomination hearing.

Biden was even more remote from the person who tested positive on his plane, O’Malley Dillon said, describing the individual as an “administrative member” of the aviation company that charters Biden’s plane.

This person, whom the campaign did not name, “was stationed in the last row of the 737 aircraft,” remote from Biden, O’Malley Dillon said.

“Given these facts, we have been advised by the Vice President’s doctor and the campaign’s medical advisors that there is no need for the Vice President to quarantine,” she added. .

Biden has been tested for the coronavirus regularly, and his campaign recently decided to publicize the results of each test, after Trump was hospitalized. Biden’s test on Thursday marked the ninth known time since Oct. 2 that he has tested negative for the virus. He has not reported any positive tests.

Biden campaign officials have touted the team’s safety protocols, including limiting attendance at their events by reporters and supporters. The vast majority of his campaign stops are open to only a press “pool” — a rotating group of reporters and photojournalists — that is tested for covid-19, rather than to the entire press corps.

At an event last month that was open to a wider group of reporters, members of the press had their temperatures taken before entry and were questioned about whether they had experienced any symptoms of covid-19. They were seated in socially distant spots marked by white circles.

O’Malley Dillon said the campaign evaluates its strategy every week.

“We’re very mindful of the covid numbers; we’re very mindful of local guidelines,” she said.

Felicia Sonmez contributed to this report.