Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

An armed passing motorist was credited with saving the life of an Arizona state trooper by shooting and killing a gunman who ambushed the trooper in the middle of a lonely interstate highway before dawn Thursday.

"I would just say at this point, thank you, because I don't know that my trooper would be alive today without his assistance," Col. Frank Milstead, director of the Arizona Department of Public Safety, said after he met with the seriously injured trooper at the hospital.

Thanks for the thoughts and prayers this morning for our Trooper that was shot. Looks like he will be okay after some recovery @Arizona_DPS — Col. Frank Milstead (@frank_milstead) January 12, 2017

The trooper — a 27-year veteran who hasn't been identified but was reported as stable with gunshot wounds in his chest and right shoulder — was responding to reports that shots had been fired at about 4 a.m. (6 a.m. ET) on Interstate 10 about 40 miles west of Phoenix, Milstead said.

On the way, the trooper spotted a rollover accident, stopped to investigate and began blocking off the scene. A woman who was believed to have been ejected from the vehicle was later determined to have died at the scene, authorities said.

Emergency personnel at the scene where an Arizona state trooper was shot Thursday morning on Interstate 10 near Tonopah. Mark Henle / AP

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"As the trooper exited his vehicle and began to lay out flares, it appears at this point that he was ambushed by the suspect," Milstead said. "In the initial confrontation, the suspect shoots the trooper in the shoulder [and] right chest area at least one time, possibly twice, disabling the use of the trooper's right hand and right arm."

The gunman then attacked the trooper with his hands, bashing his head into the pavement, Milstead said. That's when the passing motorist stopped.

"The trooper says, 'Please help me,' and asks the uninvolved third party for help," Milstead said. "That person retreats back to his vehicle, removes his own weapon from the vehicle, confronts the suspect, giving him orders to stop assaulting the officer. The suspect refuses. The uninvolved third party fires, striking and killing the suspect."

The hero driver was identified only as a man who was traveling to California with his wife.

A second motorist who also stopped at the scene ran to the trooper's vehicle, grabbed its radio and called for help.

Emergency personnel at the scene where an Arizona state trooper was shot Thursday morning on Interstate 10 near Tonopah. Mark Henle / AP

"My concern was his life," that second motorist, Brian Schober, of Scottsdale, Arizona, told NBC News on Thursday. He wouldn't give any other details except to say he and the man who shot the suspect had been able to meet each other and say thank you.

According to a recording of the police radio exchange, Schober told a dispatcher: "Hello, officer down, officer down outside Tonopah. Come in, please. This is a civilian. He's shot on I-10 on the eastbound lane — sorry, westbound lane."

Schober continued: "He's in real bad shape. Please send air support, helicopter, please. There are also two civilians on — off — [the] road also laying [in] unknown condition."

The dispatcher began coordinating an emergency response, keeping Schober on the radio before asking for a status report.

"I believe he was in an altercation with a motorist," he responded. "There's a lady laying on the road, uh, still moving, not dead. The other gentleman was shot by a passerby who, uh, stopped the altercation after the officer was shot. ...

"The suspect is occasionally snorting or breathing. He's been shot by the passerby. He's laying right next to the officer," Schober reported.

Emergency personnel at the scene where an Arizona state trooper was shot Thursday morning on Interstate 10 near Tonopah. KPNX-TV via NBC News Channel

Milstead said few other details were immediately available because the investigation was still in its early stages.

"We don't know what the story is, and we'll figure that out as time goes on," he said. But one thing was clear, he said:

"In our worst hour, we may need your help, and this was today. ... Thank you. Thank you for the support."