PORTLAND, Maine (AP) — The state supreme court has upheld the murder conviction and 40-year sentence for man who killed his wife with a shotgun blast in their Windham home.

The Supreme Judicial Court on Thursday unanimously rejected Noah Gaston's contention that COVID-19 restrictions violated his constitutional rights by preventing him from confronting parties at his sentencing.

Gaston acknowledged killing his wife, Alicia, with a shotgun blast in 2016, but maintained that he thought she was an intruder.

The prosecution allowed the victim’s family and friends to testify by video at the sentencing while Gaston’s family and friends viewed the proceedings from a separate room at the courthouse to allow for social distancing during the pandemic.

“Anyone who wanted to address the court or access the proceeding was able to do so, despite the pandemic restrictions,” Justice Joseph Jabar wrote in the supreme court's ruling.

The court also rejected Gaston's argument that the sentence was too long and that the judge wrongly concluded he waived his right to religious privilege when he told a third party about conversations with church members.

The church members, who picked Gaston up at the local police station after his wife died, said he told them he saw a figure he thought was an intruder before he fired. But he also told them that was the only story he could tell if he wanted to see his kids again, according to the police affidavit.