An Arizona state trooper owes his life to an armed citizen who shot a man along a remote stretch of highway just east of California. The now-deceased man had, a few minutes earlier, opened fire and wounded the officer, police said Thursday.

The trooper, Edward Andersson, was responding to an emergency call — a report that someone had shot at his vehicle under cover of darkness from the median of Interstate 10.

The 27-year member of the Arizona Department of Public Safety was en route to the spot when he spotted a rolled-over car. A woman lay on the ground, apparently ejected from her vehicle. Andersson exited his car to mark the area with road flares.

As he did so, an assailant struck.

The man shot Andersson between the right shoulder and chest, once or possibly twice, said Col. Frank Milstead, Arizona’s Public Safety Department director. In a news conference in front of a hospital in Goodyear, Ariz. Milstead said that the reason the man fired at the trooper, in what the director called an “ambush-style attack,” remained a mystery as of Thursday morning.

Andersson’s gunshot wound rendered his right arm and hand useless. Still, the trooper and attacker engaged in physical combat, and the attacker gained the upper hand. “The suspect is getting the better of the trooper and is on top of him,”  Milstead said as he described the incident to reporters, “striking the trooper’s head on the pavement.”

A man driving with his wife on the interstate witnessed the altercation. He stopped his vehicle and approached the trooper, asking if the officer needed help.

Andersson did, and when he replied in the affirmative, the passerby retrieved a gun from his car. Under Arizona law, it is legal to use deadly force in defense of a third person whose life is threatened. It would not be unusual for a motorist in the area to have a weapon. Arizona has a long history as a gun-friendly state; as Arizona guns-rights advocate Charles Heller told the Associated Press, “If you see a guy walking down the street in Tucson, with a gun on, you don’t think much of it. It’s natural.”

After arming himself, the passerby confronted “the suspect, giving him orders to stop assaulting the officer,” said Milstead. The attacker refused.

The man fired, mortally wounding the attacker.

As Andersson lay bleeding on the highway pavement, another civilian phoned for help. “The suspect is uh, occasionally breathing or stirring. He’s been shot by a passerby,” the man said, reported Phoenix’s KPHO. NBC News identified the caller as Brian Schober, a former medic from Scottsdale, Ariz.

“Hello, officer down, officer down outside Tonopah,” Schober told the dispatcher, using the officer’s radio. “Send a helicopter.”

The armed motorist kept watch over the attacker while the caller radioed for help, Schober told Arizona’s ABC 15. “If he would have tried to stand up, he would have been shot again,” Schober said of the suspect. Schober told NBC News few details about the other citizen with the gun, except that the two had met and exchanged thanks.

Medical helicopters transported the woman and Andersson to a hospital in Goodyear. The armed third party, as well as the attacker and the woman in the car, have not been identified. Both the attacker and the woman are deceased.

“Everything happened down in the middle of nowhere,” Milstead said. He said he did not know how it all got started.

“And all of the people who knew what happened are dead — except for my trooper, who drove upon the scene,” he said. Arizona state detectives were investigating the incident, according to an Arizona Public Safety Department statement released Thursday. It was unknown what caused the rollover, and whether the attacker was involved in the initial 4:20 a.m. report of gunshots.

The Public Safety Department director applauded the citizen’s intervention. “In our worst hour, we may need your help,” Milstead said, “and this was today.”

“I don’t know that my trooper would be alive today without his assistance,” Milstead added.

Milstead called Andersson “a true hero” and an “incredibly tough individual;” in addition to his work as a trooper, Andersson volunteered as a volleyball coach at the high school 10 miles away from where he was shot. As of late Thursday morning, Andersson was in serious but stable condition, being treated for the gunshot wounds and injuries to the head. It appeared he would make a recovery.

“This incident is another reminder of the risks that the men and women who wake up each morning and put on the badge take for our state,” said Arizona Gov. Doug Ducey (R) in a statement. “I urge Arizonans to join me in praying for a quick recovery for this brave officer and thanking everyone who, through their actions in real time, showed our officers exactly what Arizona means when we say: ‘You have our backs — and we will always have yours.’ ”

More from Morning Mix: