A California man will be sentenced to two life sentences after admitting to killing his estranged wife and another woman.

Los Angeles County DA Miguel Angel PrietoMiguel Angel Prieto pled guilty to one count each of first-degree murder and second-degree murder and two counts of attempted murder in the 2018 deaths of Maria Perez and Rocio Sandoval, Los Angeles County District Attorney George Gascón announced Thursday.

According to prosecutors, Prieto, 46, was involved in three different shootings in 2018 that resulted in two deaths.

The first happened in Azusa, California, on Feb. 9, 2018, when Prieto shot at a man he mistakenly thought was his estranged wife Perez’s boyfriend. The man was with Sandoval, 38, at the time.

“The man was sitting with a woman in a car when Prieto walked up to the pair, spoke to them and later shot them,” prosecutors said, according to the DA. Sandoval died from her injuries sustained in the shooting two days later, the San Gabriel Valley Tribune reported at the time.

Los Angeles County DA Miguel Angel PrietoThen on April 7, Prieto “visited Perez’s uncle’s restaurant in Long Beach and shot at a woman,” the DA said.

Perez, 42, was fatally shot by Prieto just days later on April 11.

“Prieto went to his estranged wife’s Covina home, shot her several times, then fled the area,” the DA said. Perez was pronounced dead on the scene when authorities arrived.

Prieto was arrested shortly after when police found him in a fast-food parking lot in Long Beach, the San Gabriel Valley Tribune reported at the time.

Prieto’s formal sentencing is currently scheduled for March 3, but Gascón said Thursday, “Given the senseless and brazen crimes committed by Miguel Angel Prieto, he will be sentenced to two consecutive life sentences.”

Legal representation for Prieto could not immediately be identified.