A doctor was pulled over for speeding. Instead of a ticket, the cop gave her N95 masks.

When a doctor got pulled over for speeding in a Minnesota highway, she was expecting to get a ticket.

But instead, Dr. Sarosh Janjua received a small act of kindness from a state trooper — and a warning not to speed.

Janjua, a cardiologist, was pulled over by a Minnesota State Patrol officer, she explained in a Facebook post Friday. After handing him her Massachusetts license, she explained that she drives to Minnesota once a month to fill-in for hospitals in the area.

She was scolded by the officer, who said that she “would not only take up resources” if she was in an accident, “but would also not be in a position to help patients.” He didn’t ticket Janjua, but after the stern exchange, she thought he was reaching in his pocket to give her back her license.

Instead, she found five N95 masks in her hands, which she said came “from the supply the state had given him for his protection.” She "burst into tears," she said, from his generosity.

"Like all healthcare workers and emergency responders around the world, I have felt afraid of not having adequate protective equipment, and in my darkest moments, have worried about what would happen if I fell sick far from home," Janjua wrote.

The Minnesota State Patrol later identified the trooper as Brian Schwartz. According to a statement given to NBC News by the patrol, Schwartz noticed two used masks in her bag, suggesting that she was re-using the personal protective equipment, and "thought (she) could use the extra masks."

"Thank you to Sarosh for her hard work and dedication," said a statement published on the Minnesota State Patrol Facebook page. “Troopers are working hard during the pandemic and are thinking about all the first responders who are caring for Minnesotans during this critical time.”

“This complete stranger, who owed me nothing and is more on the front lines than I am, shared his precious masks with me, without my even asking,” Janjua said.

Follow Joshua Bote on Twitter: @joshua_bote.

This article originally appeared on USA TODAY: Coronavirus: Minnesota cop gives doctor N95 masks instead of ticket