LOUISVILLE, Ky. (WDRB) - An Arizona state police trooper killed in the line of duty was a 2012 graduate of Jeffersontown High School.

Trooper Tyler Edenhofer was a rookie who was shot and killed Wednesday near Phoenix. The 24-year-old was in his final week of training and had only been on the job for 52 days.

The Arizona Department of Public Safety Colonel Frank Milstead says Edenhofer and two other troopers responded to a report of a person throwing rocks at vehicles on Interstate 10.

A fight ensued when troopers tried to get 20-year-old Isaac D. King off the roadway.

Six officers, including some local police, were struggling with the suspect for several minutes when he somehow got a hold of the Trooper Sean Rodecap's weapon. Rodecap is a field training officer who was not wearing a uniform. King then fired two shots, Milstead said.

One hit Edenhofer in the shoulder but ricocheted downward, DPS 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.

Whether the weapon became dislodged or how King was able to fire it is under investigation, Milstead said. It was in a standard leather holster tethered to the officer's belt.

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

Edenhofer was killed just two months after graduating from the Department of Public Safety academy. The U.S. Navy veteran was engaged to be married.

Edenhofer's body was escorted in a procession to the Maricopa County Medical Examiner's Office.

Gov. Doug Ducey ordered flags at state office buildings to be flown at half-staff until sunset Friday.

"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.

Copyright 2018 WDRB Media. The Associated Press contributed to this report. All Rights Reserved.