NAPERVILLE, Ill. (AP) — A suburban Chicago police officer who fatally shot a hatchet-wielding man during a June traffic stop was justified in the deadly shooting, a prosecutor has determined.

DuPage County State’s Attorney Robert Berlin said Monday that Naperville police Officer Frank Tonkovich “reasonably believed” that Edward Samaan, 28, of Naperville was trying to kill either him or a driver Tonkovich had pulled over separately.

PREVIOUS STORY: Naperville police release footage of deadly shooting of hatchet-wielding man

Berlin said in a news release that Tonkovich’s actions were not just reasonable “but necessary in order to prevent great bodily harm or death to himself or the motorist he had stopped,” The (Arlington Heights) Daily Herald reported.

The officer had pulled over a car on June 3 and was standing at that driver’s window when Samaan pulled his vehicle up nearby, exited it and charged Tonkovich with a hatchet in his hand, Berlin said.

Tonkovich then shot at Samaan six times, hitting him five times. Samaan was pronounced dead at a hospital.

The officer, a 22-year-veteran of the Naperville Police Department, was not injured.