Four Massachusetts State Troopers were legally justified in fatally shooting a Presque Isle man who fled Maine while under investigation for an alleged sexual assault, the New Hampshire Attorney General’s Office ruled on Wednesday.

The details of the shooting of Michael Brown, 40, on June 15 were detailed in a 40-page investigative report released by New Hampshire Attorney General Gordon J. MacDonald. The report contains audio and video of the incident.

The troopers said they thought they were justified in shooting Brown because he had already shot at them and was trying to run them over after leading them on a 40-mile chase.

Brown was “was attempting to avoid apprehension on June 15, 2017, and created a dangerous situation, which he escalated to the point where it became reasonable for four Massachusetts State Troopers to conclude that they faced an imminent threat of deadly force from Mr. Brown,” the report concluded.

The troopers involved — Michael Caranfa, Robert Holland, George Katsarakes and Daniel Purtell — will not face any charges and are back at work.

The Presque Isle Police contacted Brown on June 7 about the sexual assault allegations, but he avoided them and fled in his uncle’s stolen Toyota Tacoma truck with his uncle’s loaded 9 mm pistol on June 15.

Brown’s relatives told police that he had contacted them and had said that he would “not go down without a fight” and would try to get shot by police, the report stated.

Brown was spotted in Malden, Massachusetts. After a chase to Newton, New Hampshire, during which he fired his weapon a number of times at troopers and continued speeding through the state — sometimes with no headlights, in the wrong direction on Interstate 495 in Amesbury and on tires that had partially been disabled by spike strips before finally crashing the truck.

Brown pointed a gun out of the window of the truck at two troopers, revved the engine at police and drove toward them, prompting the fatal shooting, according to the report.

Troopers who witnessed the shooting gave statements supporting their colleagues’ version of events.

Brown died from a gunshot wound to the neck. The medical examiner ruled that a homicide, a term used to define the killing of one person by another. Autopsy results showed that Brown’s blood “revealed the presence of the active and inactive components found in marijuana, as well as amphetamines and methamphetamines,” according to the report.

A pistol found in Brown’s truck “contained no live rounds and had an empty magazine in it that could hold up to 15 rounds,” the report said.

“It was reported that the gun contained 15 live rounds when Mr. Brown stole it,” the document continued. “Therefore, the fact that it was found empty after the incident is consistent with Mr. Brown having fired up to 15 shots before the pursuit ended, including some at the pursuing troopers.”

Massachusetts State Police do not have body cameras or video cameras in their cars, according to the report. However, a Massachusetts State Police helicopter recorded audio and video of the chase. Trees obscured the view of the actual shooting.