Gas station carjacking and kidnapping thwarted. (Screenshot)

When a Texas mother got out of her car to buy gas at a local Shell station, a carjacker got into her car and started to drive off with her two young children still inside the vehicle.

Police say the mother quickly jumped into the front passenger seat and pulled her gun out of the glove compartment and began begging the carjacker to stop, WFAA ABC 8 reports.

When he refused, she shot him in the head. After the car crashed, she rescued her two toddlers from the vehicle. When police arrived, the wounded carjacker was taken to a local hospital.

The incident occurred around 10 P.M. on Wednesday, July 4th, police say.