A firefighter who was nine months pregnant and involved in a car accident has been hailed a “true public servant” after she put herself aside and stepped in to help others in the smash.

Megan Warfield, a firefighter in the US state of Maryland, was just a week away from her due date when she was involved in a car crash.

The mum-to-be was able to get out of her damaged car and went straight to another driver who was trapped in a second vehicle that had overturned.

She began giving the person first aid and remained with them until emergency crews arrived to free the victim.

Sky News partner NBC 15 news said Ms Warfield was checked over for injuries and cleared by a trauma team – and less than 24 hours later, she gave birth to a baby girl.

Bowleys Quarters Volunteer Fire Department, where Ms Warfield is a member, hailed her as “a true public servant”.

“Since no good deed should go unrecognised, we wanted to highlight Megan’s heroic and selfless actions,” the department wrote in a Facebook post.

More on Maryland

It went on: “Megan had just finished organising and hosting her late father’s second annual memorial golf tournament when she was involved in a significant motor vehicle collision.

“Ignoring any chance she could be injured, Megan immediately exited her mangled vehicle and began providing care to a person trapped by their overturned car.”

“Less than 24 hours later, Megan delivered her beautiful baby girl.”

And in a comment on the post, Ms Warfield’s boyfriend, Joshua Daugherty, said both mum and baby were healthy and happy.

“Thank you, everyone, for the out pour of support. Baby CJ is doing great! Megan is resting up and can’t wait to be back in the field doing what she loves!” he wrote.