Police identified a man who shot himself after being fired upon by officers Thursday afternoon in Northwest Albuquerque just outside of Rio Rancho city limits.

Gilbert Gallegos, an Albuquerque Police Department spokesman, said an autopsy found Matthias Wynkoop, 40, died from a self-inflicted gunshot wound.

“While two officers fired their weapons, the autopsy did not reveal any other bullet wounds,” he said.

Police responded Thursday afternoon to the Puerta del Sol Apartments after Wynkoop called 911 to say “he was suicidal and armed.”

Officers fired at Wynkoop when he pointed a gun at them, according to police. He then got into a truck, a single shot was heard, and the truck sped into a retaining wall.

Wynkoop died at the scene. A handgun and rifle were found in the truck.

Court records show Wynkoop had a recent history of mental health issues and run-ins with police. Wynkoop’s Facebook page shows photos of him with his son, making goofy faces and touring amusement parks.

His family could not be reached.

In October, Wynkoop pointed a gun at himself and others, according to court records. Days later, he led police on a chase that ended in Moriarty, during which he threatened suicide.

Wynkoop was hospitalized and not arrested in either case, which involved misdemeanor DWI and gun charges.

The New Mexico State Police officer involved in the second case petitioned for an Extreme Risk Firearm Protection Order, known as a Red Flag law, within a week of the incident.

The officer wrote that Wynkoop had nine rifles and six handguns seized from his truck in the arrest, according to court records. The officer alleged Wynkoop had displayed “signs of mental illness,” saying he had been shot when he wasn’t and that people were “trying to hurt him.”

“Wynkoop stated ‘don’t make me do something stupid’ while I was trying to remove him from… his truck, as he was pulling himself closer to a firearm,” according to the petition.

Court records show that, during a hearing, Wynkoop testified that “he was having health issues and not handling well” and recently “relapsed with alcohol.”

“Wynkoop testified that he messed up, but he did not want to lose his firearms,” according to court records.

The DWI case was dismissed because the officer “failed to provide discovery,” but a judge granted the officer’s red flag petition on Nov. 17, banning Wynkoop from possessing or buying firearms for a year.

“Detectives are working to determine how the man had additional firearms that were used during Thursday’s incident,” APD spokesman Gallegos said.