MUSKEGON, Mich. (WOOD) — A man who died amid a shootout with state police troopers after breaking in to a home near Muskegon last month killed himself, the prosecutor says.

The Muskegon County prosecutor decided the two troopers were justified in their use of force. That means they won’t face any criminal charges.

“The two Troopers involved in the fatal shooting … acted in self-defense and defense of others,” Muskegon County Prosecutor D.J. Hilson wrote.

The shooting happened on the afternoon of April 4 on Sugaridge Drive near West River Road in Laketon Township. A teen in the home called 911 when a man — later identified as Joseph Miller, 37, of Muskegon — broke in. A recording of the 911 call showed the teen locked herself in her bedroom and hid while Miller moved around the house. Dispatchers sent two Michigan State Police troopers to the home.

In his report on the shooting, Hilson said dashboard camera, body camera and doorbell camera video shows that one of the troopers knocked on the front door and announced he was an officer. Miller jumped out of a window. The trooper, who was about 30 feet away, told him not to move but Miller opened fire.

“The intruder pointed his handgun and repeatedly fired his weapon directly at Trooper #1. Trooper #1 shot back at the intruder,” Hilson wrote. “Trooper #2 … also shot back at the intruder who was shooting his gun at Trooper #1. Trooper #2 can be heard yelling ‘Drop your gun.'”

At that point, Hilson said the video shows, Miller fell onto his back and shot himself in the head.

Hilson said an autopsy confirmed the self-inflicted shot is what killed Miller, though it also revealed he sustained gunshot wounds to the chest and extremities. Toxicology testing also found amphetamines and opiates in Miller’s body.

Neither trooper was injured, nor was the teen girl who called 911.

The prosecutor said Miller had what’s called a “ghost gun” — a gun without a serial number that was assembled from parts that can be sold in a kit.

In addition to saying the troopers acted reasonably in response to the threat, Hilson commended them for their professionalism, skill and bravery.

“The 9-1-1 call makes it clear that the teenage victim was in imminent danger and that the Troopers that responded to the home invasion took heroic action to save her life,” he wrote.

He also praised the teen for her “courage and clear thinking” and the dispatcher who helped keep the teen calm and comforted her for the about 14 minutes it took troopers to get to the rural home.