No one denies Rigoberto Sanchez drove to his wife's apartment the night of May 28, 2017, and ended up gunning down his wife's lover and firing at but missing his wife.

But Sanchez, a former correctional officer, fired only after first the lover, then his wife pointed a gun at him, Sanchez's attorney told the jury during his closing argument Tuesday. He said Sanchez acted in self-defense.

Also during his closing, Deputy Public Defender Paul Cadman blasted Bakersfield police for failing to test all relevant items of evidence and for what he called an overall "sloppy investigation," and the prosecutor for searching for a conviction rather than the truth.

"As unsavory as this case is, this case is fairly simple," Cadman told the jury. "Two people thought it was OK to point a gun at a peace officer, and one of them paid with his life."

Sanchez's trial on murder, attempted murder and other charges began mid-August. Cadman was expected to finish his closing argument late Tuesday afternoon and the jury should begin deliberations Wednesday.

Sanchez killed 33-year-old Edwin Lima when he fired through a bedroom window of his wife's northeast Bakersfield apartment. Lima was struck by 17 of 21 bullets, and Sanchez's wife managed to scurry out of the room uninjured.

Sanchez, his wife and Lima all worked as correctional officers at California Correctional Institution in Tehachapi. Sanchez and his wife had separated but were still married. She began a relationship with Lima, who was also married. 

Cadman told the jury Sanchez went to the apartment that night following a 40-minute phone call with Lima in which they had a heated exchange. Lima made vulgar comments about carrying on a relationship with Sanchez's wife. 

To give the jury an idea of how long the call took place, Cadman placed his solid gold 1980 Tiffany Portfolio watch under a court projector and asked jurors to watch as the seconds ticked away. 

Once the minute was up Cadman said, "There's 39 more of those!" 

Sanchez planned to fight Lima, not kill him, the attorney said. He said Sanchez confronted Lima outside the apartment, but Lima refused to fight and went back inside.

Walking back to his vehicle, Sanchez picked up a cinder block he planned to throw at Lima's truck, according to the attorney and Sanchez's testimony. As he passed the apartment's bedroom window, Lima made an obscene comment about Sanchez's stepdaughter, Cadman said.

Sanchez threw the cinder block through the window. Lima then drew a gun and began raising it at Sanchez, the public defender said. Sanchez shot and killed Lima, then fired at but missed his wife when she picked up the gun and pointed it at him, Cadman said.

A key to the case, the attorney told jurors, is an alleged unrecorded third interview police conducted with his client. Detectives have said they only interviewed Sanchez twice: once in Arizona where he was transported following his arrest in Mexico weeks after the shooting, and once at Bakersfield Police Department headquarters.

But Sanchez testified a third interview took place immediately after the second interview when he was brought into another room at BPD headquarters. He said it was during that interview he first told investigators he fired in self-defense.

Police and the prosecutor say no such interview occurred, and that Sanchez was only placed in that room to finish eating a sandwich before he was booked. Lead investigator Detective Eric Littlefield at first testified that room isn't recorded like the other room where the second interview took place so no footage of what happened is available. 

Last week, however, Littlefield said he'd been informed the room where Sanchez ate his sandwich does in fact have cameras monitoring it. Another detective testified he's not sure where that footage was stored or how long it was kept, but it can no longer be found. 

Cadman pointed to that lack of video from the alleged third interview and the department's failure to test certain items in the bedroom where the shooting happened as failings on the part of the investigation.

For instance, the prosecution has said Lima was rising from the bed when he was first shot. The bedspread, however, was never tested for DNA. If Lima's blood isn't on it, the attorney said, then he couldn't have been lying on it when he was shot.

Instead, it would be more likely he was standing in the room as Sanchez has testified. 

Cadman said a police detective testified the bedspread wasn't tested because of the cost.

"Who pays when we can't afford to do everything?" Cadman asked the jury. "He does," he said while pointing to Sanchez, "and you do."

While Sanchez testified he fired in self-defense, prosecutor Gina Pearl said during her closing argument Monday that he never mentioned self-defense during two lengthy interviews with Bakersfield police detectives. She said he only claimed self-defense once he realized it was the only option left to him since he dropped an ammo magazine at the scene that was traced to him, and he's lying about the third interview. 

Pearl also told jurors the actions of Sanchez after the shooting show consciousness of guilt because he fled the scene, traveled to Mexico and disguised himself by growing facial hair and wearing tattoo sleeves.

Sanchez planned in advance to kill both his wife and Lima because he was consumed with jealousy over their relationship, she said.

He packed his belongings into his stepdaughter's vehicle so he could avoid being tracked, Pearl said. Then he told his stepson not to stay at his mother's apartment that night, and when he arrived at the apartment complex he walked to his wife's apartment with a gun in his hand.

Pearl said Sanchez threw the cinder block not out of anger over an obscene comment, but to move the window blinds so he could get a clear view inside the room and gun down his victims.