CNN  — 

President Donald Trump paid a visit to wounded service members at Walter Reed National Military Medical Center on Saturday and wore a mask after months of refusing to be seen doing so in public.

“I’ll probably have a mask if you must know. I’ll probably have a mask. I think when you’re in a hospital especially in that particular setting, where you are talking to a lot of soldiers, people that in some cases just got off the operating table. I think it’s a great thing to wear a mask. I’ve never been against masks but I do believe they have a time and a place,” Trump told reporters ahead of his visit.

Trump was seen briefly in a mask while walking with staff, who also were wearing masks, at the medical center in Bethesda, Maryland. He did not make any remarks while wearing one. This is the first time since the pandemic began that the White House press corps got a glimpse of Trump with a face covering.

The President’s decision to wear a mask during his Saturday trip to the medical center comes after months of declining to publicly wear one – against the recommendations of his own administration’s public health experts.

Joe Biden’s campaign responded to Trump’s decision to wear a mask with the former vice president’s spokesman, Andrew Bates, saying the President “wasted” four months discouraging people from wearing masks while Biden “has led by example from the start.”

“Donald Trump spent months ignoring the advice of medical experts and politicizing wearing a mask, one of the most important things we can do to prevent the spread of the virus,” Bates said Saturday night in a statement.

CNN previously reported that Trump’s agreement to don a mask in public was the result of heavy “pleading” by aides, who urged the President to set an example for his supporters by wearing a mask on the visit.

During a Fox News interview Thursday, Trump teased his visit to Walter Reed, saying, “I expect to be wearing a mask when I go into Walter Reed. You’re in a hospital setting, I think it’s a very appropriate thing.”

Trump then doubled down on his intent to wear a face covering in a hospital setting, saying in a Friday interview with Telemundo, “That wouldn’t be difficult at all for me.”

Masks have become a political flash point as some Americans argue the requirement infringes upon their civil liberties. But the US Centers for Disease Control and Prevention urges everyone to wear a “cloth face cover when they have to go out in public,” noting that masks are critical in areas where social distancing is difficult to maintain since the coronavirus can spread between asymptomatic people and through respiratory droplets in the air.

Even after the federal government recommended Americans wear masks in places where social distancing is impossible, Trump declared he was unlikely to ever wear one himself. And even as some of his aides gently encouraged him to be seen following his own government’s advice, Trump insisted wearing a mask would make him appear weak and give off the impression that he wasn’t controlling the pandemic.

The President has also ridiculed those who have worn one publicly, like Biden. The White House insists that mask wearing isn’t necessary for Trump since he and those around him are tested regularly for Covid-19.

During a May visit to a Ford plant in Michigan, Trump refused to wear a mask in view of the press, because he said he didn’t want to give into media criticism and pressure.

This story has been updated with additional details.

CNN’s Sarah Mucha, Jeremy Diamond, Kevin Liptak and Jason Hoffman contributed to this report.