HAMPTON, N.H. (AP) — New Hampshire's attorney general has ruled that two state troopers were legally justified in the fatal shooting of an intoxicated man armed with a pellet gun outside a state liquor store last month.

Authorities have said that Sgt. Keith Walker and Trooper Erik Willett shot Barry Jones, 36, at the Hampton store along Interstate 95 on June 13 after getting reports that Jones was intoxicated, had borrowed his neighbor's pickup truck and had a handgun.

In his 44-page report on the shooting, Attorney General Gordon MacDonald ruled that Jones "created a dangerous situation which he escalated and this prompted the officer-involved shooting incident" at the liquor store where dozens of people were shopping.

Jones, according to the report, ignored repeated commands from the officers to drop his gun and reached into his waistband and pulled out what looked like a handgun but was later determined to be a semi-automatic pellet gun. He then pointed it at the officers, prompting them to fire four shots, hitting Jones in the back, abdomen and left shoulder. He later died at Portsmouth Regional Hospital.

Neither officer was hurt. Walker has served 19 years and Willett five years as a trooper.

"These actions and the speed at which they occurred as well as the reports of Mr. Jones prior conduct, led troopers to reasonably believe they, as well as others in the immediate vicinity ... faced an imminent threat of deadly force from Mr. Jones," MacDonald wrote. His report was released along with video surveillance obtained from the liquor store and audio from cellphone footage of the incident.

Despite Jones not having a "real firearm," Macdonald wrote that it was reasonable for the officers to believe he had handgun based on what they had been told and because it looked authentic. "Moreover, the manner Mr. Jones used or threatened to use the weapon further supported the Troopers' belief," the report found.

Jones, who the report said had a history mental health problems, was later found to have texted his ex-wife "I'm sorry I love you but it is time for me to check out." That text was another piece of evidence MacDonald used to justify the shooting, saying that demonstrated he was suicidal and "had no intention of being apprehended and likely intended to prompt the Troopers to shoot him."

Jones' ex-wife, Tiffany Jones, could not immediately be reached for comment.

She told Seacoast Online in June that Jones was a "great man" who struggled with substance abuse and mental health issues. The couple had just moved back in with her father in Portsmouth after a stint in Florida. She says Jones had gone off the medicine he took for bipolar disorder, anxiety and depression three days before the shooting.