"We are United in our effort to defeat the Invisible China Virus, and many people say that it is Patriotic to wear a face mask when you can't socially distance," Trump tweeted on Monday -- nearly three months after the US Centers for Disease Control and Prevention recommended wearing masks in public.
"There is nobody more Patriotic than me, your favorite President!" he added.
The image appears to show Trump wearing a mask with the presidential seal at his visit to Walter Reed National Military Medical Center earlier this month -- his first and only time so far donning a facial covering in public after months of refusing to be seen doing so in public amid the coronavirus pandemic.
The shift to encouraging mask-wearing was primarily motivated by floundering poll numbers, a source familiar with the President's thinking told CNN.
For months, aides tried to get Trump to wear a mask, saying they could have "MAGA", "Trump-Pence 2020" or even the American flag printed on them. But he steadfastly refused and only wore a mask once in public.
But it wasn't until a meeting with campaign aides at the White House last week, where aides bluntly told him even internal numbers showed Americans didn't approve of his response, that Trump relented, according to an official who attended that meeting.
Trump's agreement to don a mask in public at Walter Reed came after heavy "pleading" by aides, according to a presidential adviser, who urged the President to set an example for his supporters by wearing a mask on the visit. But Trump was reluctant, in part, because he didn't want to give in to media pressure.
On a trip to a Ford plant in May, for example, Trump said he wore a mask on parts of the plant tour where reporters were not allowed, saying he "didn't want to give the press the pleasure of seeing it."
But as the number of coronavirus cases grew across several states -- including key Republican and battleground states and more Republican officials publicly endorsed mask-wearing in an attempt to depoliticize it, efforts to convince Trump to support wearing a mask ramped up.
Trump's advisers also linked wearing a mask to political success, a key argument as Trump's poll numbers were low and coronavirus remained a top concern for voters. Wearing a mask, the advisers suggested, was an easy step that's well-received by the vast majority of Americans.
Earlier in the spring, Trump mocked Democratic presidential candidate Joe Biden for wearing a mask, and during a press briefing in April, he suggested that it wouldn't seem presidential.
"(S)omehow sitting in the Oval Office behind that beautiful 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. Maybe I'll change my mind," Trump said at the time.
CNN's Kevin Liptak, Jeremy Diamond and Allie Malloy contributed to this report.