SALT LAKE CITY — A lawyer for Utah doctor Martin MacNeill, convicted of killing his beauty queen wife, told the Utah Court of Appeals on Tuesday that his client should get a new trial because prosecutors failed to disclose a deal they struck with a prisoner who testified that MacNeill confessed to the crime.

The prosecution committed misconduct by failing to tell the jury the prisoner was offered shortened prison time if he gave testimony that benefited the prosecution, attorney Kent Morgan said during a hearing in Salt Lake City. The testimony from MacNeill’s former cellmate was the lynchpin in a case based on thin circumstantial evidence and the prosecution’s theory that MacNeill killed his wife to begin his life with a mistress.

“Committing adultery is not a murder,” Morgan said. “Adultery is a terrible thing and may be some motive, but it is not evidence of murder.”

MacNeill, 60, was convicted of drugging his wife, Michele, and leaving her to die in a bathtub in 2007 in Pleasant Grove, Utah. He is serving at least 17 years and up to life in prison.

Prosecutors say MacNeill introduced his mistress as a nanny within weeks of his wife’s death, before his older daughters quickly recognized her as his secret lover.

Tera Peterson of the Utah Attorney General’s Office acknowledged that prosecutors erred in not explaining what investigators had offered the inmate for his testimony. But Peterson said jurors were told the inmate was promised a letter of recommendation to reduce his sentence for the testimony.

More importantly, she said, the case against MacNeill didn’t hinge on the man’s testimony. She said 45 other people testified during the three-week trial.

“This was not a close case,” Peterson said.

Appeals Court judges expressed dismay at the error, with Presiding Judge J. Frederic Voros Jr. calling it offensive that the prosecution allowed the inmate to say he was only testifying for morally upright reasons without setting the record straight.

But Voros and two other judges questioned whether the jury would have made a different decision even knowing the details of the offer to the inmate. That, they said, is the question they must answer in deciding whether to grant a new trial.

Morgan argued that’s the wrong question, and that the mistake amounts to prosecutorial misconduct that should trigger a new trial.

The judges said they will issue a ruling at a later date.

The hearing renewed questions about a verdict that was called disturbing by the head of the Association of Criminal Defense Lawyers because it seemed to be based largely on circumstantial evidence and speculation.

The case became a national true-crime cable TV obsession with its tales of plastic surgery and philandering, betrayal and family feuding, jailhouse snitches and a jetted bathtub brought into the courtroom.

Outside court, Utah County Deputy County Attorney Chad Grunander defended his team’s work and said prosecutors didn’t cover up any deal with the inmate. He said the part of the deal not disclosed was made with the prisoner’s attorney without their knowledge. He said the evidence against MacNeill was overwhelming and that they would take it back to trial if needed.

MacNeill’s daughter Alexis Somers, said she has no doubt her father murdered her mother and lamented that his attorneys are trying to use a technicality to get a new trial. She said jurors told her and her family that they didn’t even consider the prisoner’s testimony in finding her father guilty.

“There were mountains of evidence against my father,” Somers said. “There’s no question in my mind … My father is a very dangerous man.”