An Alabama man accused of trying to attack the mother of his children while she was stuck at a traffic light was thwarted by a legally armed witness who shot him in the face, according to police. 

The Dothan Police Department reported that on July 12 Shawn Maxmillion McDaniel of Headland followed the mother of his kids as she drove through Dothan. The woman's name has not been disclosed and the couple were estranged

McDaniel reportedly tried to meet up with the woman earlier, but she refused, so he allegedly followed her in a car. The mother was traveling with someone whom police described as an acquaintance, and the pair soon caught on that McDaniel was tailing them. 

The mother and acquaintance stopped at a traffic light, where McDaniel allegedly hopped out of his car while wielding "a large knife" and confronted the pair. The acquaintance was legally armed and demanded McDaniel walk away, according to police. 

GUN-TOTING FLORIDA DAD RUSHES TO DAUGHTER'S APARTMENT, TURNS TABLES ON HER ABUSIVE EX: POLICE

Alabama traffic light

Traffic light on 600 block of North Oates Street in downtown Dothan, Alabama. (Google Maps )

The suspect refused the warning to leave and, instead, allegedly swung the knife, prompting the woman's acquaintance to fire his gun. 

OHIO DOORBELL SHOOTING: WOMAN SAYS EX-BOYFRIEND KILLED BY DAD 'DIFFERENT' AFTER MOVE TO CALIFORNIA, DRUG USE

McDaniel was struck in the face and "sustained a major injury but was conscious and alert," police said in a press release. McDaniel returned to his car and drove to a nearby business to seek help. 

police building Dothan, Alabama

The Dothan Police Department in Alabama (Dothan Police Department/FB)

TEXAS DAD LEFT IN COMA AFTER BRUTAL ATTACK WHILE PROTECTING DAUGHTER FROM BOYFRIEND: COPS

The mom and acquaintance also drove to a nearby business and called police. 

"McDaniel was transported to a local hospital for treatment for the gunshot wound. He was then transported to an out-of-town facility for more specialized treatment. Currently, it is not believed his injury is life-threatening," police said.

CLICK HERE TO GET THE FOX NEWS APP

The investigation into the matter is ongoing, with potential charges pending. The Dothan Police Department did not immediately respond to Fox News Digital's request for any additional updates on the case.