PHOENIX -- A man with a history of mental illness used the gun of an Arizona state trooper to shoot and kill a rookie officer in training and wound another two troopers during a fight along an interstate in suburban Phoenix, authorities said Thursday. Police identified the slain officer as 24-year-old Tyler Edenhofer, CBS Phoenix affiliate KPHO-TV reports.

"He'd been one of my troopers for 52 days," Col. Frank Milstead, director of the Arizona Department of Public Safety, said Thursday afternoon.

Milstead said Edenhofer's mother told him "you just got him" at the hospital Thursday morning.

Get Breaking News Delivered to Your Inbox

"I will never forget her words," Milstead said.

Tyler Edenhofer Arizona Department of Public Safety

The shooting occurred after troopers responded to reports of a person throwing rocks late Wednesday at vehicles on Interstate 10 roughly 15 miles west of downtown Phoenix. A struggle followed with a third trooper who was not shot, but injured.

Officers took 20-year-old Isaac D. King, of Avondale, into custody and transported him to a hospital, where he remained Thursday. Authorities would not say why he was hospitalized.

King was on medication for anxiety and depression and has no criminal record, Milstead said.

"We've talked to his parents, his mother particularly, who has been cooperative and thought he was in the backyard during this event. She said at about 9:30 p.m., he'd been outside on the trampoline," Milstead said.

Troopers were struggling with the suspect for several minutes when he somehow got a hold Trooper Sean Rodecap's gun -- a training officer who was in plain clothes. He then fired two shots, Milstead said.

One hit Edenhofer in the shoulder but ricocheted downward, Department of Public Safety spokesman Capt. Tony Mapp said. Trooper Dalin Dorris was shot through the shoulder, treated at a hospital and released.

Rodecap was injured, but not shot, in the fight and taken to a hospital for evaluation. He has since been released.

The investigation into whether the weapon used became dislodged or if King somehow grabbed it is still under investigation.

"We're all in a little bit of a state of shock," Milstead told reporters. "The DPS family is in mourning."

Edenhofer was a veteran of the U.S. Navy. He was also engaged to be married. His body was taken in a procession to the Maricopa County Medical Examiner's Office.

Gov. Doug Ducey ordered flags at all state office buildings to be flown at half-staff until sunset Friday in honor of Edenhofer.

"This tragedy is an all-too-real and heartbreaking reminder of the harm our heroic law enforcement officers face each and every day for the safety and well-being of Arizonans," Ducey said in a statement.

Eastbound lanes of I-10 were reopened early Thursday after being closed for about eight hours.