President Donald Trump came prepared.

As he took the podium Tuesday to give a briefing room update on the coronavirus for the first time in months, the president was asked an obvious question: If wearing a mask is “patriotic," as he tweeted this week, why didn't he wear one more frequently?

“Well, I do actually do it when I need. I mean, I carry the mask,” Trump responded. He reached into his suit jacket pocket and produced his for the cameras: navy blue, with a presidential seal.

FILE - In this July 11, 2020, file photo President Donald Trump, foreground left, wears a face mask as he walks with others down a hallway during a visit to Walter Reed National Military Medical Center in Bethesda, Md. On Tuesday, July 21, Trump professed a newfound respect for the protective face masks he has seldom worn. “Whether you like the mask or not, they have an impact," he said. "I’m getting used to the mask,” he added, pulling one out after months of suggesting that mask-wearing was a political statement against him. (AP PhotoPatrick Semansky, File)

FILE - In this July 11, 2020, file photo President Donald Trump, foreground left, wears a face mask as he walks with others down a hallway during a visit to Walter Reed National Military Medical Center in Bethesda, Md. On Tuesday, July 21, Trump professed a newfound respect for the protective face masks he has seldom worn. “Whether you like the mask or not, they have an impact," he said. "I’m getting used to the mask,” he added, pulling one out after months of suggesting that mask-wearing was a political statement against him. (AP PhotoPatrick Semansky, File)

“I have no problem with the masks. I view it this way: Anything that potentially can help, and that certainly can potentially help, is a good thing. I have no problem. I carry it, I wear it ... and I’ll continue," he added.

The comments were a dramatic about-face for a president who, for months, resisted wearing a face covering in public and complained privately he thought it would make him look weak and would focus attention on the public health crisis rather than the economic recovery.

Even as top public health officials, who initially had advised the public not to wear masks, became convinced that face coverings could effectively halt the spread of the virus and begged the public to embrace them, Trump resisted. He mocked Democratic rival Joe Biden for wearing one, asked reporters to remove them and entertained the idea that people might be wearing them to spite him.

President Donald Trump holds a mask as he speaks during a news conference at the White House, Tuesday, July 21, 2020, in Washington. (AP PhotoEvan Vucci)

President Donald Trump holds a mask as he speaks during a news conference at the White House, Tuesday, July 21, 2020, in Washington. (AP PhotoEvan Vucci)

“I just don’t want to wear one myself,” he said in April. "I don’t know, somehow sitting in the Oval Office behind that beautiful Resolute Desk — the great Resolute Desk — I think wearing a face mask as I greet presidents, prime ministers, dictators, kings, queens, I don’t know. Somehow, I don’t see it for myself. I just don’t. Maybe I’ll change my mind."

By Tuesday, as coronavirus cases continue to rise across much of the nation, Trump finally came around, saying, “I'm getting used to the mask.”

“I will use it gladly, no problem with it," he said, urging those watching to follow his lead.

“When you can, use the mask. If you're close to each other, if you’re in a group, I would put it on," he said.

But that pronouncement was too little, too late for some public health officials, who have blamed the mixed messaging and Trump's personal actions for politicizing mask-wearing and fueling a partisan social divide.

“I think it would have been enormous impact if he had done it from Day One,” said Lawrence Gostin, a public health expert at Georgetown University. He worried that Trump's words would have only marginal impact in moving Americans who aren’t consistently wearing masks in public to do so.

If, from the beginning, "you had consistent messages at the federal, state and local level, if everyone had been on the same page all along on the importance of masks, we’d be in a different situation," Gostin said.

And Trump still declined to wear a mask at the briefing — noting that he and the reporters who cover him are frequently tested. And he was seen without one Monday evening at the Trump hotel in Washington, where he attended a fundraiser and ate dinner.

Former House Speaker Newt Gingrich, an occasional informal Trump adviser, had urged the president to wear a mask to the briefing, saying during an appearance on “Fox and Friends” Tuesday, “That’s what’s going to convince people that he’s serious about this."

Trump tweeted a photo of himself in a face mask Monday, calling it an act of patriotism. He wore one for the first time in public earlier this month during a visit to Walter Reed National Military Medical Center.