A quick-thinking Massachusetts state trooper is being credited for helping a pregnant woman get to a hospital in time to safely deliver her baby, after initially pulling over her and her boyfriend for speeding.

Around noon Wednesday, State Trooper Jose Cabrera clocked a vehicle going over 100 miles per hour on Route 91 in West Springfield and understandably pulled it over, the Massachusetts State Police said in a Facebook post.

LONGEST MASSACHUSETTS NURSES' STRIKE ENDS AFTER 10 MONTHS

That’s when Cabrera was informed by the driver that he was speeding because his girlfriend, who was in the vehicle, was in labor and her water had just broken.

Cabrera initially called dispatch for an ambulance, but none were available for assistance, so the trooper sprung into action himself, according to the post.

A Massachusetts State Police trooper vehicle.

A Massachusetts State Police trooper vehicle. (Massachusetts State Police)

Cabrera then assured the mother-to-be that he would get her to the hospital, putting her into the back of his cruiser and instructing the boyfriend to follow behind.

CLICK HERE TO GET THE FOX NEWS APP 

Moments later, Cabrera assisted the mother-to-be inside Mercy Medical Center, where she safely delivered her healthy baby.

In a thankful gesture, the unidentified mother posed in a photo with Cabrera, who was allowed to hold the newborn.