After an illegal immigrant shot and attacked an Arizona state trooper on the side of a highway last week, the driver who came along and saved the officer’s life by shooting the perpetrator believes God put him there to do just that, police revealed Monday, as Fox News reported.

The shootings occurred last Thursday morning along Interstate 10 outside Phoenix. Leonard Penuelas-Escobar, an illegal immigrant and former Mexico federal police officer, rolled his car over while driving at a high speed, investigators told the Arizona Republic and Fox News reported. Passenger Vanessa Monique Lopez-Ruiz, 23, was thrown from the car and died at the scene.

[lz_ndn video=31852343]

When Edward Andersson, a 27-year veteran trooper, arrived at the scene and began setting up flares, the illegal immigrant shot him in the shoulder and then began attacking him.

The “Good Samaritan” — whose name has not yet been released — was passing by and shot Penuelas-Escobar after asking him to stop beating the Arizona cop.

“He knows that he did the right thing,” said Col. Frank Milstead, director of the Arizona Department of Public Safety, according to Fox. “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.”

(Image credit: NBC News)