Santa Clara County prosecutors announced on Tuesday that two San Jose police officers were justified in shooting a suicidal man outside his home last year.

One shot each by the officers ended in the death of 18-year-old Anthony Nunez outside a home at 994 Feller Ave. on July 4, 2016.

"Officer Michael Santos and Officer Anthony Vizzusi each actually and reasonably believed that they needed to use deadly force to protect themselves and others, when Nunez leveled a gun in the direction of police," Deputy District Attorney Bud Porter wrote in a report released Tuesday.

The report detailed an investigation by the district attorney's office, which investigates all fatal police encounters to determine whether deadly force was justified.

At 4:15 p.m. on July 4, 2016, Nunez tried to kill himself by shooting himself in the head, according to prosecutors. He failed when the bullets stopped at his skull.

A cousin called 911 and police officers were sent at 4:51 p.m. to Nunez's home where the shooting occurred.

Prosecutors said as officers approached the home to help Nunez, he appeared in the doorway with a revolver in his hand.

A crisis negotiator tried for 10 to 15 minutes to convince Nunez to drop the gun but he would not.

Prosecutors said a standoff ensued and at 5:27 p.m., when Nunez was outside his home, he twirled the revolver on his finger, gripped it and pointed it in the direction of officers.

Santos and Vizzusi were across the street and each fired a shot from their rifles, killing Nunez.

Prosecutors said investigators found a revolver near Nunez's body.