A Good Samaritan saved the life of an Arizona trooper being beaten on the side of a deserted stretch of highway

The man who shot an Arizona State Trooper in the shoulder last week was as an illegal immigrant and a former Mexico federal police officer. The attacker was then shot and killed by a driver who saw the officer in danger and stopped to help.

Videos by Rare

Col. Frank Milstead, director of the Arizona Department of Public Safety, commended the man for doing the right thing in a very difficult situation.

“He knows that he did the right thing. He is trying to reconcile that in his mind, which, it’s difficult to take a life, even when you know it’s the right thing to do,” Milstead said of the Good Samaritan.

The series of events happened Jan. 12 along Interstate 10 outside Phoenix. Leonard Penuelas-Escobar was driving at a high rate of speed and rolled his car, throwing 23-year-old Vanessa Monique Lopez-Ruiz from the vehicle. She died at the scene, investigators told the Arizona Republic.

RELATED: Police are looking for the man who shot an officer outside a Florida Walmart

A motive remains unknown, but Penuelas-Escobar then shot at a passing car. Multiple drivers called police and Edward Andersson, a veteran trooper, arrived at the scene. As he was setting up road flares, Penuelas-Escobar shot him in the shoulder and then attacked.

[protected-iframe id=”21fe1cbbb011e74dbf8c2b35a9e54c28-46934866-41575867″ info=”http://www.azcentral.com/videos/embed/96644638/?fullsite=true>” width=”540″ height=”304″ frameborder=”0″ scrolling=”no”]

“I’m going to guess that he was impaired. They were both known meth users,” Milstead said of Penuelas-Escobar and Lopez-Ruiz. “You can surmise that maybe there were hallucinations … you can surmise that he was frustrated that his girlfriend was mortally injured in this collision and people wouldn’t stop (to help them).”

The man who spotted the officer being attacked — he is not ready to identify himself, police said — grabbed his own gun and told Penuelas-Escobar to stop beating Andersson. When Penuelas-Escobar refused to stop, the man shot him twice. Penuelas-Escobar then went after the Good Samaritan, who fired a fatal blow to the suspect’s head.

RELATED: Search for Oklahoma man who allegedly shot two officers comes to a violent end

Andersson underwent surgery and was expected to recover. The Good Samaritan, police say, was on his way to California for the weekend with his fiancée.  He told police he occasionally practices marksmanship with friends in the military and law enforcement fields.

“I can tell you this,” Milstead said, “if he didn’t save Trooper Andersson’s life, he definitely kept him from having much more severe neurological injuries from this beating that he was taking helplessly at the time.”

What do you think?

Donald Trump being president is making very clear who is principled and who is just partisan

You’re making nachos wrong