Moments before being sentenced Friday to life in prison, Stephen Carl Allwine denied killing his wife Amy and said the jury had wrongly convicted an innocent man.

“I didn’t hurt Amy,” Allwine said in a packed Washington County courtroom. “I loved her so much. The grief of losing her is tremendous.”

But District Judge B. William Ekstrum told Allwine, 44, that he was “incredibly cold and incredibly calculating” before pronouncing the automatic life sentence that comes with a premeditated first-degree murder conviction.

“My perception is that you are an actor,” Ekstrum told Allwine.

A jury of six men and six women found Allwine guilty Wednesday after eight hours of deliberations and a trial lasting six days. Prosecutor Fred Fink said at Friday’s sentencing that the jury had reached the right conclusion and that the “uncaring execution of Amy Allwine is incomprehensible.”

An extensive police investigation revealed that Stephen Allwine used his skills as an internet technology specialist to shop on the dark web, under the alias “dogdaygod,” for a hit man to kill his wife. After he paid thousands of dollars to presumed murderers who bilked him, he sent anonymous threatening e-mails telling Amy to kill herself.

He eventually shot her in November 2016, according to Fink and co-prosecutor Jamie Kreuser, because he wanted out of their marriage but was an elder in a church that discouraged divorce.

Stephen Allwine reported his wife’s death as a suicide after taking their son into their Cottage Grove house to see her body. She was shot at close range in the right ear.

Amy Allwine was a popular dog trainer, described by a friend as someone “who brought boundless joy” to people. She talked of family, travel, music and books, and loved to dance.

Her parents, Charles and Joanne Zutz, expressed their grief in a statement read at the sentencing by victim advocate Kathy Woxland. At Amy’s wedding 20 years ago, her father wrote, he “put her hand into Steve’s and asked him to take good care of my little girl.”

The Zutzes said they were “astonished” to hear how Stephen Allwine plotted her murder. After she died, he lived with her parents for two months without telling them the truth, her father said.

“The cruelty caused to Amy and her family is beyond words,” Charles Zutz wrote.

Amy’s sister, Julie Brown, read a comment from the Allwines’ son, who was 9 when Amy was murdered.

“My mom was a good mom. I will always love her and remember her,” said the boy, who wasn’t present in the courtroom.

Brown said Amy Allwine had talked about the threatening e-mails and lived in fear as a result. After she was killed, “we wondered if whomever killed Amy was going to kill us.”

In his statement to the court, Stephen Allwine insinuated that an unknown killer had entered the house through an unlocked patio door.

“I saw her for the first time with her eyes wide open and no life behind her eyes,” he said.

As he spoke, his comments interspersed with awkward pauses; some people in the courtroom gasped. Others wept.

“Even though she’s gone, she’s gone knowing I loved her,” Allwine said. “The only image I have in my mind is one of my smiling, beautiful wife.”

Allwine lamented that he hadn’t testified — “maybe I should have, to explain certain things” — and said he lost his case because prosecutors did a better job of persuading the jury than did his defense attorney, Kevin DeVore.

“There is pain on both sides of the courtroom. They are suffering greatly,” said DeVore.

After the sentencing, Fink said Allwine had attempted a disturbing lie.

“We’re looking at a complete narcissist,” Fink said. “His elocution was all about him, not Amy or her death.”