But midafternoon — less than a week after testing positive for the potentially lethal virus — Trump returned to work in the West Wing, potentially endangering any staffers still in the building.

Trump’s presence there sent yet another message to the public that illness has not chastened a president who has consistently eschewed masks and social distancing. His rush to get back to business as usual just two days after leaving Walter Reed National Military Medical Center has been the most prominent example of the continued defiance of public health guidelines at the White House. It isn’t the only one.

Though aides who have tested positive, including counselor Hope Hicks and press secretary Kayleigh McEnany, have stayed home, aides who have continued to test negative have remained on the job. Among them were Chief of Staff Mark Meadows, senior adviser Jared Kushner, social media director Dan Scavino and political director Brian Jack, administration officials said.

Kushner was in contact with Christie, Hicks and others involved in prepping the president for last week’s debate. Meadows has been in contact with virtually everyone in the president’s orbit who is now sick. And at least four aides who traveled on Air Force One and Marine One with a maskless Trump last Thursday were in the White House this week, officials say.

Meanwhile, Vice President Pence, who aides said has had several negative tests, flew to Utah on Tuesday to prepare for his debate late Wednesday with the Democratic vice-presidential nominee, Sen. Kamala D. Harris (D-Calif.).

Pence attended the Sept. 26 Rose Garden ceremony to announce Trump’s nomination of Judge Amy Coney Barrett to the Supreme Court that is suspected to be at the center of the White House outbreak. He was near others during the ceremony who have since tested positive and was in the Oval Office last week with Trump, albeit briefly.

And almost every senior official in the White House this week shared a room with an aide or adviser who has since tested positive, officials said, but they defended their presence by saying it was usually not in “close contact” — or within six feet for more than 15 minutes.

Their decisions reflect a White House that has declined to follow the best medical practices to contain the virus, even as at least 13 employees in the complex have tested positive. The Centers for Disease Control and Prevention recommend that anyone exposed to the virus remain quarantined for at least two weeks to avoid the risk of spreading it to others.

Beyond the White House gates, other Trump aides also have exhibited a reluctance to fully embrace the CDC guidelines — most prominently Attorney General William P. Barr, who also attended the Sept. 26 Rose Garden ceremony. Despite that, Barr attended a Justice Department meeting Friday and, after several days at home, returned again to his office Wednesday, aides said.

Since news of Trump’s infection was made public last Thursday, Barr has had six coronavirus tests that were negative, an aide said.

Kerri Kupec, a State Department spokeswoman, said Barr would “limit his time in the building” to specific meetings and “take the necessary precautions.” She cited CDC guidance last month that allows essential workers in some fields, including law enforcement, to return to work after exposure as long as they are not exhibiting symptoms and are taking other precautions.

However, medical experts said even aides who have tested negative for several days should stay at home for the full two weeks.

“The general recommendations are that you can’t kind of test out of quarantine,” said Rochelle Walensky, chief of the division of infectious diseases at Massachusetts General Hospital. “If you are exposed and test negative on Day 3, that does not mean you won’t test positive on Day 6.”

White House aides have continued to test positive in the days after the president’s diagnosis. Late Tuesday, senior adviser Stephen Miller tested positive, even though he said he had been working remotely and self-quarantining since last week. His wife, Katie Miller, is a spokeswoman for Pence and contracted the coronavirus in the spring. She flew to Utah with Pence for the debate but left the state Tuesday night after her husband tested positive.

White House spokesman Judd Deere said the White House Medical Unit has conducted contact-tracing measures among the staff and made “appropriate recommendations” to aides deemed to have been exposed to the virus.

In a memo to staffers, the White House said, “If you have tested positive for Covid-19, are quarantining due to a close contact, or are self-isolating due to symptoms, you MUST be cleared by the White House Medical Unit before returning.” Those who fulfilled those requirements would be cleared to return after testing negative, the memo said.

It is not clear how many people inside the White House are deemed to have been exposed. Scavino and Kushner are not known to have attended the Rose Garden ceremony, but Meadows did. Some others who were present at that event — including the president, first lady Melania Trump, Christie and former White House adviser Kellyanne Conway — have tested positive.

“The essential work of the White House and the federal government must continue, which sometimes does require essential personnel to be physically in the office,” Deere said in a statement, “and when that occurs, every precaution is being taken to protect the health of the president, themselves, and the entire complex.”

Deere had been working from home in recent days but returned to the White House on Wednesday, while several of McEnany’s other aides also have tested positive.

On Wednesday morning, Meadows said in a Fox News interview that he had been working with the president in the White House residence, discussing options for a coronavirus relief package with Treasury Secretary Stephen Mnuchin.

“He’s fully engaged and feeling great,” Meadows said of Trump. “I continue to test negative, but at the same time we know this virus has a way of reaching out and getting people when they least expect it.”

Sean Conley, the White House doctor, said in a statement Wednesday that Trump has been without fever for four days and was without symptoms for 24 hours. Another White House spokesman, Brian Morgenstern, told reporters that aides would be given personal protective equipment, such as masks, gloves and goggles, so they can approach the president safely.

“The White House and the West Wing are deep-cleaned on a regular basis,” Morgenstern said. “So there is a way for him to work out of a variety of rooms safely when he’s ready to do that.”

Other government entities appeared to be taking greater precautions. The Pentagon’s Joint Chiefs of Staff, including the chairman, Gen. Mark A. Milley, announced Tuesday that they would self-quarantine after Coast Guard Adm. Charles W. Ray tested positive. Ray, Milley and the other military leaders attended a White House ceremony with Trump for Gold Star families on Sept. 27.

On Capitol Hill, the offices of Sens. Mike Lee (R-Utah) and Thom Tillis (R-N.C.) have been closed this week. Both men tested positive after the Rose Garden ceremony.

Among Trump’s campaign team, at least two high-profile members were isolating after testing positive last week — campaign manager Bill Stepien and Republican National Committee Chair Ronna McDaniel. Christie, who helped Trump prepare for his debate with Democrat Joe Biden last week, has tested positive and is hospitalized in Morristown, N.J.

Rudolph W. Giuliani, the former New York mayor who serves as Trump’s personal attorney, also was on the debate prep team. He has said publicly that his coronavirus test results have been negative, but he did not respond to requests for comment.

The flurry of infections has alarmed local D.C. officials and created a fresh opening for Democrats to blast the administration’s response to the virus, which has killed more than 211,000 Americans and infected more than 7.5 million.

“I don’t want to go anywhere near the White House,” House Speaker Nancy Pelosi (D-Calif.) told reporters Wednesday. “It’s one of the most dangerous places in the country.”

Seung Min Kim and Matt Zapotosky contributed to this report.