Long pants, no problem.

Clad in blue hospital scrubs, Philadelphia nurse Samantha Roecker ran the Boston Marathon on Monday in an unofficial time of 2 hours, 48 minutes, and 2 seconds — the fastest marathon by a woman while wearing nursing attire.

Setting the record was not her primary goal. Roecker, 30, ran to raise funds and awareness for the mental health and well-being of others in her profession, prompted by hearing stories of burnout during the COVID-19 pandemic.

Consider that goal accomplished, too. As of midday Monday, she had raised $43,388, earmarked for the nonprofit American Nurses Foundation.

Roecker, an elite-level runner who goes by Sam, works 25 hours a week at a Penn Medicine ear, nose, and throat clinic, and up to 20 hours a week at the emergency department of Cooper University Hospital in Camden. A registered nurse, she also is studying at Penn to become a nurse practitioner.

Those demands cut into her training time, so she was not expecting to match her personal marathon record — just under 2½ hours, set in December 2020.

Yet she broke the nursing-attire record with ease. Her performance has yet to be certified by Guinness World Records, but it was more than 20 minutes faster than the old mark of 3:08:22, set by British nurse Jessica Anderson in 2019.

“I tried to have a mix of fun and getting the most out of myself,” Roecker said by phone Monday afternoon.

Guinness did not recognize Anderson’s record at first, telling her she had to wear a dress and cap. After an outcry, the organization changed course.

“It has become quite clear to Guinness World Records that our guidelines for the fastest marathon wearing a nurse’s uniform were outdated, incorrect and reflected a stereotype we do not in any way wish to perpetuate,” the organization said then.

At Monday’s Boston Marathon, the top finisher among women was Kenya’s Peres Jepchirchir, whose time was 2:21:01. First place for the men went to her countryman Evans Chebet, who finished in 2:06:51.

Roecker was not the only nurse in the field with Philly-area ties.

Kayla Lampe, a former emergency-room nurse at Bryn Mawr Hospital, finished in 2:38:38, the top woman from the Philadelphia Runner Track Club. Nick Cardamone was the top male finisher from the club, finishing in 2:30:18.

Among other Philly-area notables: