LUDLOW, Maine — A state police sergeant was justified when he shot and killed an armed man outside the man’s residence here last fall, the Maine attorney general has concluded.

“All facts point to the conclusion that Sgt. Joshua Haines acted in self-defense and in the defense [of another trooper]” when he fired on 52-year-old Alan Gillotti Sr. on Oct. 14, 2014, Attorney General Janet T. Mills stated in a news release issued Thursday.

Mills indicated her decision was based on an extensive forensic investigation and her review of the evidence gathered and interviews conducted with numerous individuals after the shooting.

“At the time Sgt. Haines shot Mr. Gillotti, he reasonably believed that unlawful deadly force was imminently threatened against him and Trooper [Tim] Saucier,” Mills concluded. “It was reasonable for Sgt. Haines to believe it necessary to use deadly force to protect himself and Trooper Saucier from an imminent threat of unlawful deadly force.”

Gillotti was shot to death after police said he was involved in an armed home invasion in Bridgewater earlier in the day on Oct 14.

A trooper and two deputies from the Aroostook County sheriff’s office earlier that Sunday had gone to Corner Road in Bridgewater after the homeowner called 911 to report a man had forced his way in while brandishing a firearm. She said there had been a brief altercation inside with a man later identified as 48-year-old Timothy Slaton. Slaton then fled in a vehicle with another person later identified as Gillotti.

State police Sgt. Haines and Trooper Saucier were subsequently called in to assist and drove to Gillotti’s home in Ludlow at approximately 3:30 p.m. in an effort to locate him, Timothy Feeley, spokesman for the attorney general’s office, said in a written statement issued Thursday.

Haines recognized the home as one where he had been in the past and recalled that Gillotti had been confrontational on that occasion, Feeley said.

The troopers parked their cruisers off the roadway in sight of the residence but not in the driveway.

Both troopers were in uniform, and Saucier was driving a fully marked cruiser, Feeley said. When Haines got out of his cruiser, he saw Gillotti standing in the doorway, holding a handgun in his right hand, which was at his side, according to Thursday’s release.

As recounted in the release, Haines then drew his handgun and ordered, “state police, drop the gun.”

Gillotti responded, “No, it’s my property, I don’t have to.”

Saucier, who saw Gillotti with his forearms extended out of the doorway and pointing a black handgun in the direction of Haines, then drew his sidearm.

Further investigation showed Gillotti was approximately 89 feet from Haines, according to investigators.

Gillotti refused additional commands from police to drop his weapon, Feeley said, prompting Haines to retrieve a rifle from his cruiser. Saucier had drawn his sidearm but was out in the open without adequate cover, according to investigators.

Haines continued to tell Gillotti to drop his gun, but “Mr. Gillotti raised the handgun, removed the magazine, re-inserted it and manipulated the slide to chamber a round, demonstrating to the officers that the weapon was loaded.”

In response to several more commands to drop the gun, Gillotti pointed the gun in Haines’ direction, according to the report. Haines fired several rounds from his rifle at Gillotti, who disappeared from the officer’s view. Haines and a deputy sheriff who arrived at the scene approached the residence and found Gillotti dead on the floor just inside the doorway. A black .45 caliber semi-automatic handgun in the “fire” position and loaded with nine rounds was near his right hand, according to the report.

No one else was inside the residence. Investigators later found 10 additional live .45 caliber rounds in the right pocket of Gillotti’s pants.

An autopsy determined Gillotti had been shot four times, according to the attorney general’s office.

His blood alcohol level was 0.14 percent, nearly twice the legal limit, and “there were discernible levels of marijuana, Diazepam, Oxazepam, Temazepam, Oxycodone and Sertraline in his system.”

Gillotti was previously diagnosed with chronic pain because of trauma, osteoarthritis, back pain, pain disorder and anxiety disorder, according to the report.

The attorney general investigates any incident in which a law enforcement officer uses deadly force in the performance of his or her duties.

On June 17, 2015, Slaton was convicted of aggravated criminal trespass and criminal trespass and sentenced to 39 days in jail for his role in the crime.