Rigoberto Sanchez

Rigoberto Sanchez speaks to his attorney, Deputy Public Defender Paul Cadman, during opening statements in August for his trial in the killing of his wife's lover, Edwin Lima.

A Kern County jury found a Tehachapi prison guard guilty of first-degree murder Friday morning in the slaying of his estranged wife's lover.

The jury also convicted 40-year-old Rigoberto Sanchez of attempted murder and the three other felonies filed against him. He faces life in prison.

Sanchez gunned down 33-year-old Edwin Lima when he fired through a bedroom window of his wife's northeast Bakersfield apartment the night of May 28, 2017. Lima was struck 17 times.

Deputy Public Defender Paul Cadman, Sanchez's attorney, said he believes his client will get the convictions overturned on appeal.

"While we respect and accept the verdict in this case, we feel strongly that the appeals process will ultimately reveal this to be a wrongful conviction," he said.

Prosecutor Gina Pearl said, "We're very pleased with the verdict and the victims' families are grateful."

Sentencing is scheduled before Superior Court Judge Gary T. Friedman on Oct. 17.

Sanchez claimed at trial he fired in self-defense, and that Lima had pulled a gun and was raising it at him when he unleashed the barrage of bullets. He said he also shot at his wife when she picked up the gun Lima dropped after being hit and raised it at him.

The prosecution, however, told the jury the killing was a cold-blooded murder fueled by Sanchez's jealousy that his wife was moving on with her life.

The jury returned its verdicts around 11 a.m. Friday. It had been deliberating since Wednesday.

Pearl told jurors Sanchez's actions both before and after the shooting were those of a guilty man.

Before the killing, he packed some belongings and placed them in his stepdaughter's vehicle — which Pearl said he used that evening to help avoid detection by police who were looking for him in connection with a burglary he earlier committed at his wife's apartment.

Sanchez dropped of a gun at his parents' home, keeping another gun that could hold more bullets. He then spoke with his stepson, who lived with Sanchez's wife. He told the stepson not to stay at the wife's apartment that night.