More than 300 people attended a birthday party and campaign fundraiser hosted by a Republican congressional candidate in Maryland over the weekend, an event that sparked criticism from a political opponent and highlighted the challenges of campaigning in the middle of a pandemic.

Maryland Del. Neil C. Parrott (R-Washington) celebrated his 50th birthday campaign-style Saturday, raking in about $50,000 for his bid against Rep. David Trone (D) in Maryland’s 6th District, he said.

But photos of the gathering at Antietam Recreation, a summer day camp in Hagerstown that also hosts group events, show crowds of people in close proximity underneath an outdoor pavilion and in a buffet line outside, with many not wearing face masks — including Parrott, who said he had one with him but “for the most part” chose not to wear it.

Maryland Gov. Larry Hogan’s executive order requires people over age 5 to wear masks in indoor facilities, but also outdoors when they are “unable to consistently maintain six feet of distance from people who are not members of their household.”

“For me it’s important to be able to talk to people, be able to smile and be able to connect with people. You just can’t do that well with a mask,” Parrott said in an interview Monday. “I did have my mask on me the whole time, and I did wear it occasionally as needed. Certain people, it’s better to wear a mask around them if they have certain conditions. But for the most part, no.”

Trone’s campaign seized on Parrott’s birthday party to accuse him of being reckless during the pandemic.

“It is irresponsible to have an event that puts people’s health at risk,” Hannah Muldavin, a spokeswoman for Trone, said in a statement. “Congressman Trone’s first priority is the health and safety of all Marylanders, and he always tries following the guidance of health professionals to help prevent the spread of the coronavirus. We encourage everyone to wear masks in public when you cannot keep six feet of social distance and limit the size of gatherings.”

Parrott’s event underscores how the pandemic has complicated the 2020 campaign season, making the traditional trappings of barbecues and fundraising mixers difficult as social distancing measures remain in place. Some candidates have held limited outdoor events, while many have turned to virtual town halls on Facebook Live, for example.

Parrott, a conservative running on a family-values and lower-taxes platform, said he has been trying not to let the pandemic foil his run for Congress. He will try to unseat Trone, a freshman congressman and multimillionaire co-founder of Total Wine & More, in a district that includes largely rural Western Maryland. Trone won the seat vacated by John Delaney with 59 percent of the vote in 2018.

Parrott insisted that he and the attendees took precautions Saturday, saying everyone he observed had brought a mask, that hand sanitizer was available and that people tried to stay six feet apart. As for seating arrangements in proximity, he said, “we left a lot of that up to people” rather than issuing directives.

Mary Rotz, owner of Antietam Recreation, said Parrott’s contract booked the space for 100 people, but Parrott said many more showed up than he expected. Rotz said that she considers the space an “outdoor pavilion,” which can host about 320 people, and that it is surrounded by glass doors, which open up to allow for better airflow. All staff and those serving food outside wore masks, she said.

Parrott and Rotz both stressed that the guests were welcome to partake in a number of outdoor activities on the property — including swimming, kayaking, basketball and zip-lining — and that all 300 or so people were never in the pavilion at once. Rotz said she never observed more than 100 people in the pavilion at a single time.

Hogan’s order requires indoor recreation facilities to limit guests to 50 percent of their maximum occupancy. Though it does not expressly forbid Marylanders from gathering in large groups for parties, the order states: “. . . To protect and save lives, it is necessary and reasonable that individuals in the state refrain from congregating.”

The Washington County Health Department was not immediately available to comment on how or whether occupancy restrictions apply to pavilions with open doors.

Parrott said that he trusted all attendees were cautious and that he was grateful they all came out to support him. Asked whether he was concerned about spreading the virus, he said the main concern was putting on a fun event for supporters.

“We took the precautions that needed to be taken according to Maryland law, and the big concern was making sure that everybody had a nice time. Everybody really did,” Parrott said. “It’s one thing to take precautions, which is what we did and what people need to do. But it’s another thing just to lock down and not do anything at all. That’s something we just can’t do. We’ve got a big race, with the election coming up in November.”

Correction: This article has been updated to correct the percentage of voters who voted for David Trone in the 6th Congressional District race in 2018.