After months of resistance to masks, President Donald Trump urged Americans to wear them to help contain the coronavirus outbreak that’s rapidly spreading throughout the U.S.

“We’re asking everybody that, when you are not able to socially distance, wear a mask,” he said at White House news briefing. “Whether you like the mask or not, they have an impact, they have an effect, and we need everything we can get.”

Trump’s comments come after the president has sent mixed messages for months on whether he supports the use of masks as a strategy to prevent the spread of the virus. Members of the White House Coronavirus Task Force, including Dr. Anthony Fauci, Dr. Deborah Birx and Director of the Centers for Disease Control and Prevention, Dr. Robert Redfield, have repeatedly urged the public to wear masks while Trump boldly disregarded their advice at public rallies and elsewhere.

Masks and face coverings, especially in indoor and crowded environments, have been touted by health officials across the world as a low-cost and effective tool in lessening public transmission

“I have no problem with the masks. I view it this way, anything that potentially can help … is a good thing,” he said Tuesday. “I have no problem. I carry it. I wear it. You saw me wearing it a number of times and I’ll continue.”

But Trump remained skeptical about the use of masks in a Fox News interview that aired Sunday.

“I don’t agree with the statement that if everybody wear a mask, everything disappears,” he said in the interview, responding to remarks made earlier in the week by Redfield, who said that if everyone wore masks, the U.S. could bring the outbreak under control in as little as one to two months.

Trump has repeatedly noted that health agencies, including the CDC and the World Health Organization, originally did not recommend the use of masks to prevent the risk of infection. Such agencies have now said they failed to do because they were concerned that the public would pressure the supply chain, preventing health workers from getting the equipment they needed to safely care for Covid-19 patients.

“We’ve had experts in the recent past that masks aren’t necessarily good to wear … but now they’ve changed their mind,” Trump said Tuesday. “If they’ve changed their mind, that’s good enough for me.”

Trump has previously criticized his own health advisors, including Fauci, Director of the National Institute of Allergy and Infectious Diseases, because they “changed their mind on masks. It’s one point of contention between the president and his advisors, none of whom were present at the briefing. Fauci said earlier Tuesday that he wasn’t invited to the briefing.

“I was not invited up to this point and I’m assuming I’m not going to be there,” Fauci said in a CNN interview less than an hour before the 5 p.m. briefing was scheduled to start.

In recent weeks, top Trump administration officials have stepped up their calls for Americans to wear masks. Assistant Secretary for Health Adm. Brett Giroir said last week that closing indoor bars and getting about 90% of Americans to wear masks in public would “shut down the outbreak.”

Despite Trump’s endorsement of masks, he has still declined to issue a national mask mandate, as some other countries have. Many governors have issued requirements to wear masks, but some have declined to do so, with Georgia Gov. Brian Kemp even suing Atlanta Mayor Keisha Lance Bottoms over her issuance of such a mandate.

The continuation of Trump’s involvement in coronavirus press briefings, which he has not participated in for months, comes as the virus continues to infected tens of thousands of Americans daily.

The virus has infected more than 66,550 people in the U.S., on average, over the past seven days, up more than 8% compared with a week ago, according to a CNBC analysis of data compiled by Johns Hopkins University.

Cases are rising by at least 5% on average in 34 states and the District of Columbia, according to CNBC’s analysis. And deaths, which lag behind diagnosis and hospitalization, have been steadily rising nationally in recent days, driven by a handful of hot-spot states.

“We’re instead asking Americans to use masks, socially distance and employ vigorous hygiene. Wash your hands every chance you get, while sheltering high-risk populations,” Trump said Tuesday. “We are imploring young Americans to avoid packed bars and other crowded indoor gatherings. Be safe and be smart.”