A former Los Angeles County Sheriff's Department deputy tortured his then-wife and her lover in an Irvine office after learning of their affair, a prosecutor said in court last week.

Robert Avery McClain, 38, of Irvine stands accused in Orange County Superior Court of eight felonies, including aggravated mayhem, torture, rape and sodomy in connection with the Sept. 28, 2008, incident.

He has entered pleas of not guilty and not guilty by reason of insanity. He faces multiple life sentences if convicted.

The Orange County district attorney's office asserts that McClain drove to the leasing office where his wife, 31 at the time, worked. Her lover, then 23, lived in the complex.

McClain and the two went to the office's break room, where he used a knife to stab the man and carve into his face "like a pumpkin," prosecutor John Cristl said.

The male victim, who was in the Central Justice Center courtroom Monday, stiffened and began breathing hard as a photo of his face after the attack was displayed.

Cristl told the jurors that McClain also forced his wife to shoot a gun aimed at her lover, but, unbeknownst to her, the chamber wasn't loaded.