A man threatening suicide leveled his gun at Phoenix police officers and was shot to death outside a mental health facility Thursday morning.

The man, who was believed to be in his mid-50s, had a history of mental of illness and drug abuse and was with a crisis team at the facility near 13th Place and Campbell Avenue in Phoenix when he became suicidal, said Sgt. Trent Crump of the Phoenix Police Department.

Crump said the man grabbed a handgun and had threatened to kill himself when police were called about 9 a.m. Police did not know how he got the weapon, Crump said.

Officers spent about 45 minutes negotiating with the man when he pointed his gun at police, Crump said. A 15-year veteran of the Phoenix Police Department fired and struck the man. He was taken to a nearby hospital, where he was pronounced dead.