Editor’s note: This story discusses suicide. If you or someone you know is having thoughts of suicide, please contact the National Suicide Prevention Lifeline at 1-800-273-TALK (8255).

The suspect who is accused of killing two California police officers during a shootout on Tuesday night died by suicide after allegedly shooting the pair of cops.

Justin William Flores, 35, allegedly killed two El Monte, California police officers while they responded to reports of a stabbing at a motel.

When the officers, Cpl. Michael Paredes and Officer Joseph Santana, approached the suspect, a shootout took place and both officers were shot. They were later pronounced dead at a Los Angeles area hospital.

The Los Angeles County Medical Examiner-Coroner’s office determined that Flores died by suicide as a result of a gunshot wound to the head, according to its website.

LOS ANGELES PROSECUTOR BLASTS GEORGE GASCON AFTER OFFICERS KILLED IN LINE OF DUTY: ‘NO ACCOUNTABILITY’

This photo provided by the California Department of Corrections and Rehabilitation shows Justin William Flores who is the alleged gunman in a Southern California shootout that killed two police officers on Tuesday, June 14, 2022 in El Monte, Calif. Flores was identified as the suspect by the Los Angeles County District Attorney's Office on Wednesday, June 15, 2022. 

This photo provided by the California Department of Corrections and Rehabilitation shows Justin William Flores who is the alleged gunman in a Southern California shootout that killed two police officers on Tuesday, June 14, 2022 in El Monte, Calif. Flores was identified as the suspect by the Los Angeles County District Attorney’s Office on Wednesday, June 15, 2022. 
(California Department of Corrections and Rehabilitation via AP)

Flores had a previous strike conviction and also received two years of probation for being a felon in possession of a firearm. The sentence is aligned with the policies of Los Angeles District Attorney George Gascon, who has been taken to court over his handling of three-strike cases.

Flores was a gang member who was on probation at the time of the shooting for a weapons charge after he received a lenient sentence through a plea deal.

The Gascon policy allowed Flores to plead no contest and get a light sentence, despite a strike being on his criminal record.

SLAIN LA AREA POLICE OFFICERS WERE ‘AMBUSHED’ BY ‘COWARD’ WHILE ’TRYING TO SAVE A FAMILY,’ OFFICIALS SAY

The city of El Monte announced Corporal Michael Paredes and Officer Joseph Santana were killed in the line of duty. 

The city of El Monte announced Corporal Michael Paredes and Officer Joseph Santana were killed in the line of duty. 
(City of El Monte)

Sources within the district attorney’s office told Fox News that Flores would have likely been handed a sentence of up to three years in prison if he was prosecuted in February 2021.

Gascon’s office told Fox News that Flores didn’t have a “documented history of violence” when he was sentenced.

CLICK HERE TO GET THE FOX NEWS APP

Los Angeles County District Attorney George Gascon speaks at a press conference, December 8, 2021 in Los Angeles. On Thursday, Gascon reversed a directive that barred prosecutors from seeking cash bail, according to a memo.

Los Angeles County District Attorney George Gascon speaks at a press conference, December 8, 2021 in Los Angeles. On Thursday, Gascon reversed a directive that barred prosecutors from seeking cash bail, according to a memo.
(Photo by Robyn Beck / AFP)

“The sentence he received in the firearm case was consistent with case resolutions for this type of offense given his criminal history and the nature of the offense,” the statement says. “At the time the court sentenced him, Mr. Flores did not have a documented history of violence.”

Fox News’ Louis Casiano and Bill Melugin contributed to this report.