This story has been updated:

Retired Westfield Police Detective Brian Fanion on Thursday denied a murder charge brought in connection with the death of his wife last year, which prosecutors said he staged as a suicide.

Amy Fanion, 51, died on May 8, 2018. Her death was originally investigated as a suicide — a self-inflicted gunshot wound, Fanion told his colleagues at the time of her death.

Fanion joined the police force in 1985, according to published reports. He was an evidence room detective on the day shift at the time of his retirement.

He was indicted and arrested Wednesday.

Assistant District Attorney Mary Sandstrom told a Hampden Superior Court judge Fanion was having an affair with another woman, and reluctant to surrender half his pension in the wake of a divorce. She also said forensic experts found the trajectory of the bullet and other factors made a suicide “impossible.”

“There was only one way to enjoy his retirement and his new love affair ... that was to kill his wife,” Sandstrom told Judge Frank E. Flannery, asking that Fanion be held without the right to bail.

Defense attorney Jeffrey Brown argued that Amy Fanion had historically struggled with anxiety and depression and chronicled her emotional struggles in a diary. He also denied that his client was having an affair.

“Her diary is replete with issues she was having … seeking God’s help to get her through these issues,” Brown said. “They’re not interested in the truth here.”

Brown asked that his client be released on $75,000 bail. Flannery opted to hold the former detective without bail.

A pretrial hearing is set in the case for Jan. 9.