The man shot and killed Sunday by San Francisco police officers after brandishing a pellet gun had several suicide notes on his phone, including one addressed to police officers, authorities said.
"You did nothing wrong. You ended the life of a man who was too much of a coward to do it himself. I provoked you," began the note. "I threatened your life as well as the lives of those around me. You were completely within your legal rights to do what you did."
The letter was released Monday after police gained permission from the father of the man, San Francisco Police Department Chief Greg Suhr said in a statement.
The shooting followed a pair of odd encounters with police that began hours earlier at 16th and Mission streets. The man allegedly approached two officers working another incident and asked them about their guns and ammo.
The man asked "what kind of guns SFPD carry, what kind of ammunition and if they had been involved in any officer-involved shootings," the department said in a statement.
The officers ignored the man and moved on, police said.
Later on, three sergeants saw the man in a restricted area of the Mission station parking lot and told him to leave, Suhr told media Sunday night.
The man began to walk away but then turned and faced the officers, Suhr said.
He began to back away from officers but kept his hands in his sweater pockets before reaching down and pulling up his sweater to show the butt of a gun tucked into his waistband, police said.
"Fearing for their safety, and in defense of their lives, the sergeants drew their service weapons as the suspect pulled his weapon from his waistband," police said in a statement.
The man was shot three times. Police then checked the weapon and realized it was a pellet gun.
The man was taken to a hospital, where he was pronounced dead just before 8 p.m. The officers involved in the shooting have been put on paid administrative leave, which is routine after such incidents.
The man's identity has not been released. The investigation into the incident is being conducted by the San Francisco police's internal affairs division, along with county prosecutors, which is standard procedure.
Suhr plans to release more details about the investigation at a town hall meeting on Tuesday evening at the Cornerstone Church.