U.S. officials are now recommending that people wear a cloth mask or facial covering in public settings like grocery stores to slow the spread of the coronavirus.

President Donald Trump announced Friday that the Centers for Disease Control and Prevention now recommends people wear non-medical cloth face coverings as a voluntary measure to defend against the transmission of COVID-19.

At the White House daily briefing, Trump emphasized wearing the covering is voluntary.

"You can do it. You don’t have to do it. I’m choosing not to do it,” Trump said. “It’s only a recommendation.”

The policy is a shift for the CDC, which has for weeks said only medical professionals, those who are sick, or those caring for the sick needed to wear masks. Over the last week, as an escalating number of Americans tested positive for the virus, pressure has mounted for the agency to revise its recommendations.

Still, the agency will not recommend everyone purchase medical-grade masks, as health systems worldwide are facing a massive shortage of protective equipment. Instead, they’re acknowledging that making a mask out of fabric or a T-shirt could help prevent carriers of the virus from spreading it if they cough or sneeze while in public, particularly before the onset of symptoms.

“I want to emphasize that the CDC is not recommending the use of medical grade or surgical masks,” Trump said.

At a briefing Thursday, Deborah Birx, coordinator of the White House coronavirus task force, described the new advisory as “an additive piece,” saying a mask was not a replacement for social distancing and hand-washing.

“We want to make sure everybody understands it’s not a substitute for the presidential guidelines that have already gone out,” she said.

The CDC recommendation is significant in the United States, where there is less social acceptance of mask-wearing than in other countries. Pennsylvania Sen. Pat Toomey, who was the first member of Congress to explicitly endorse the campaign, said “this is going to be about adopting a new social norm.”

He said in other countries that have adopted mask-wearing policies, including the Czech Republic, it quickly becomes seen as anti-social to not don a facial covering in public. “That’s what I hope happens here,” he said.

The effect of a homemade mask is not certain. Some public health officials have warned that encouraging widespread mask use could lull the general public into complacency and give people a false sense of security, leading them to leave their homes for nonessential purposes.

Experts roundly agree that the best way to prevent the spread of the virus is to stay home, wash hands frequently, and avoid touching the mouth, nose, and eyes. Any use of a mask or facial covering, they say, should be in conjunction with social-distancing guidelines and efforts to stay at least six feet away from others.

Those who pressured the CDC to revise its guidelines argued that some studies have showed that homemade masks can approach the effectiveness of disposable surgical masks if used properly and alongside good hand hygiene. In addition, new evidence suggests one in four people who have the coronavirus have no symptoms and could spread it.

A campaign encouraging the public to wear masks, called #Masks4All, gained traction after a San Francisco-based research scientist argued in the Washington Post that “we should all wear masks — store-bought or homemade — whenever we’re out in public.”

A simple mask can be made without sewing by tying together two layers of a cut-up cotton blend T-shirt and covering the face and nose with it, being sure to wash the covering after each use.

Staff writers Ellie Rushing and Mensah M. Dean contributed to this article.