Gov. Ralph Northam (D), slammed on social media over the weekend after he was photographed maskless and mingling with visitors in Virginia Beach, acknowledged Sunday that he should have been carrying a face mask in case he ended up in a crowd.

Northam has encouraged Virginians to wear masks in public and indicated on Friday that he planned to issue a mandate for masks on Tuesday, although it is not clear whether that would apply to outdoor public spaces, such as parks or beaches.

Northam, a physician, has also urged social distancing, specifically to stay at least six feet apart from others in public.

In photos that appeared on Twitter and Facebook, Northam is standing elbow-to-elbow with a group of three people as they pose for a picture at the shore. In another, he is taking a selfie with a woman. In another, he appears to be on the crowded beach boardwalk.

Northam’s office initially noted the governor was outside and was not expecting to get close to anyone, but people recognized him and wanted to take pictures.

A spokeswoman later sent an updated statement acknowledging that the governor could have been better prepared for the crowd.

“The Governor has repeatedly encouraged wearing face coverings inside or when social distancing is impossible,” spokeswoman Alena Yarmosky said Sunday. “He was outside yesterday and not expecting to be within six feet of anyone. This is an important reminder to always have face coverings in case situations change — we are all learning how to operate in this new normal, and it’s important to be prepared.”

Republicans seized on the opportunity to criticize Northam, who has been under pressure from some to ease restrictions in the state.

“Physician, heal thyself,” Virginia House Minority Leader Todd Gilbert (R-Shenandoah) tweeted.

Northam, who allowed rules on beaches to ease Friday in time for the Memorial Day holiday, had traveled to the beach “to make sure beach rules were being enforced,” Yarmosky said.