Vaccinated people may be able to spread the coronavirus and should resume wearing masks under certain circumstances, the nation’s top public health official said Tuesday in a gloomy acknowledgment that the mutated delta variant has reversed the promising trend lines of spring.

Speaking to reporters in an afternoon news briefing, Rochelle Walensky, director of the Centers for Disease Control and Prevention, expressed disappointment and dismay that the summer surge in cases, driven by the delta variant’s startling transmissibility and low vaccination rates in many areas, had forced her agency’s hand.

“It is not a welcome piece of news that masking is going to be a part of people’s lives who have already been vaccinated,” Walensky acknowledged. “This new guidance weighs heavily on me.”

The agency advised that people who live in high-transmission communities wear masks in indoor public spaces, even if they’ve been vaccinated. It also recommended that vaccinated people with vulnerable household members, including young children and those who are immunocompromised, wear masks indoors in public spaces.

The agency also called for universal masking for teachers, staff members and students in schools, regardless of their vaccination status. The CDC continues to recommend that students return to in-person learning in the fall.

The changed guidance comes as confirmed coronavirus infections nationwide have quadrupled in July, from about 13,000 cases per day on average at the start of the month to more than 56,000 now, according to Washington Post tracking. Faced with a resurgent virus thanks to the highly transmissible delta variant, a growing number of public and private employers have also imposed vaccine mandates in recent days. President Biden said Tuesday that requiring the federal workforce to get vaccinated was “under consideration right now.”

Walensky described the delta variant as, in effect, a different virus, capable of generating outbreaks of infection even among some people who are vaccinated, although those are likely to be far less severe. “The delta variant is showing every day its willingness to outsmart us and to be an opportunist in areas where we have not shown a fortified response against it,” she said.

Although the vaccines remain highly effective at preventing severe disease and death, they do not form an impenetrable shield. New data suggests that people who are vaccinated and have breakthrough infections from the delta variant may have as much viral load as a person who is unvaccinated, which suggests they may be able to spread it to others, Walensky said. Such transmission did not happen in any significant way with earlier versions of the virus.

The new recommendations substantially alter the agency’s May 13 guidance that vaccinated people did not need to wear masks indoors or outside because of the protection afforded by the coronavirus vaccines. At that time, cases were dropping sharply, and the delta variant, which is thought to be more than twice as transmissible as earlier versions of the virus, had not gained traction in the United States. That earlier guidance angered some people, including parents with young children ineligible for the vaccines, who feared that relaxed rules would put the vulnerable at greater risk.

Some people are catching coronavirus after being vaccinated. Johns Hopkins University infectious disease expert Lisa Maragakis gives advice on how to stay safe. (John Farrell/The Washington Post)

Anthony S. Fauci, Biden’s chief medical adviser, said in an interview that “the situation has clearly changed” since May 13.

“Vaccinated people are transmitting it, and the extent is unclear, but there’s no doubt they’re transmitting it,” Fauci said. “People who are vaccinated, even when they’re asymptomatic, can transmit the virus, which is the scientific foundation of why this recommendation is being made.”

Walensky stressed that agency scientists continue to believe that breakthrough infections in vaccinated individuals are rare, adding they “continue to represent a very small amount of transmission in the country.”

She also emphasized that the guidance applies to people living or working in counties that are reporting “substantial” or “high” transmission of the virus. As of Tuesday afternoon, more than 63 percent of U.S. counties met that definition, including huge swaths of the South and Midwest, up from about 46 percent of counties one week ago. States like Arkansas, Florida, Louisiana and Missouri are reporting “high” transmission levels across nearly every county.

Walensky noted that some states and counties were reporting coronavirus case levels at least three times the threshold that would qualify as “high” transmission. The “extraordinary amount of viral transmission” compelled the agency to act, she said.

In addition to the masking changes, the agency also now says that fully vaccinated people should get tested if they have any covid-19 symptoms or if they were recently exposed to someone who had a suspected or confirmed infection. Fully vaccinated Americans also should isolate if they test positive for the coronavirus or are experiencing symptoms, it said.

The rapidity of the spread of the delta variant, originally identified in India, took U.S. officials by surprise. The first infection here was identified in February, but for several months, it made little impact.

Meanwhile, the alpha variant, first seen in the United Kingdom, became the dominant strain across the country. But in June, the delta variant began to spread at exponential rates, said scientist William Lee of the genomics company Helix. Lee said Tuesday he estimates it now accounts for more than 90 percent of infections nationally. The alpha variant, by contrast, is seen in only about 3 percent of positive tests. “It’s almost gone,” he said.

The CDC’s changed guidance was mostly welcomed by medical and public health experts, many of whom had sought greater restrictions.

“Nobody wants to go backward, but you have to deal with the facts on the ground, and the facts on the ground are that it’s a pretty scary time, and there are a lot of vulnerable people,” said Robert Wachter, chairman of the department of medicine at the University of California at San Francisco. “I think the biggest thing we got wrong was not anticipating that 30 percent of the country would choose not to be vaccinated.”

Luis Schang, a Cornell University virologist, applauded the changes, saying that wearing a mask represents a “small effort,” given the suffering caused by the pandemic.

“It’s not a permanent thing — that’s an important thing to highlight,” Schang said, adding that the vaccines are still working very well and vaccination rates continue to rise. “This is not something we have to do for years. This is weeks, perhaps a couple of months.”

But some public health experts warned of loopholes in the agency’s reliance on county-level differences to determine who should wear masks.

“Basing mask recommendations on level of local transmission is a good idea in theory. In practice, there are no borders between counties, and populations mix,” said Walid Gellad, director of the University of Pittsburgh’s Center for Pharmaceutical Policy and Prescribing. “A low-risk county in a sea of high-risk counties is not low risk.”

Several officials and experts said they hoped the CDC guidance would encourage more local officials to reinstate mask mandates who may have been reluctant to do so without backing from the federal government. In mid-July, for instance, when Los Angeles County became the first major county to reimpose masking requirements indoors, it faced angry denunciations from the elected officials of a half-dozen towns that are part of the county.

“People don’t realize how bad delta is,” James Lawler, an infectious-disease doctor at the University of Nebraska, said in an email. “We are looking at transmission dynamics at least as bad as in the fall — with no mitigation measures in place in most states with low [vaccination] rates.”

Experts and some senior health officials in the Biden administration said they had grown frustrated that the CDC had not moved more quickly to change its guidance.

Three people with knowledge of the guidance said that CDC leaders pushed for more data about the benefits of masking and how the hyper-transmissible delta variant has spread, frustrating other administration officials who wanted to move more quickly as coronavirus cases surged.

Some administration officials were also concerned that requiring vaccinated people to wear masks would further discourage vaccine-hesitant Americans from getting the shots because they might regard them as less effective.

“They waited too long,” one Biden official said of the CDC, speaking on the condition of anonymity to discuss confidential conversations.

Some of the CDC’s international partners had already moved to reinstate mask mandates or delay plans to loosen them. In Israel, an indoor mask mandate was lifted on June 15, only to be reinstated on June 25 as cases of the delta variant surged. Other nations, including Australia and France, have seen regional rules on mask-wearing return this summer amid new outbreaks caused by the delta variant.

In South Korea, one of the first East Asian countries to chart a path out of the pandemic, the government announced in June that partly inoculated residents would soon be allowed to go mask-free outdoors. But before the relaxed rules could go in place, the South Korean government canceled them in Seoul and neighboring regions and ordered even fully vaccinated residents to wear masks inside and outside.