A Minnesota preacher in a failing marriage, who failed in his attempt to hire a hitman using bitcoin on the dark web, also failed to convincingly stage his wife's murder as a suicide -- a final misstep that ultimately led to his arrest, officials said.

Stephen Allwine, 44, of Cottage Grove, Minn., is currently on trial for the “premeditated first-degree murder” of his wife Amy Allwine, 43, The Washington Post reported. A criminal complaint filed in Jan. 2017 alleges Allwine attempted to hire hitmen to murder Amy, but his plan fell apart. He carried out the murder himself and set it up to look like a suicide. Amy Allwine was found dead Nov. 13, 2016.

The couple, who met at a Christian college and were active members of their church together also adopted a son.

Stephen Allwine, a religious man who served as a church elder and deacon at a United Church of God congregation also offered marriage counseling to couples having trouble. Allwine allegedly learned of Ashley Madison, a website where consumers were encouraged to have a secret extramarital affair, while counseling, prosecutors alleged. The preacher allegedly had affairs with at least two women.

GRAND JURY CONVENED IN KILLING OF JUSTINE DAMOND BY MINNESOTA COP

Allwine reportedly wanted out of his marriage but the United Church of God encouraged couples to stay together.

“Even if couples have a short courtship, fail to counsel before marrying or have dysfunctional backgrounds, none of these recognized troubles justify the later putting away of a mate with the freedom to remarry,” the church’s website stated. “Marriage is a commitment for life. Failure to plan properly is not grounds for the future dissolving of a marriage.”

"He was seeing other women but he didn't want to divorce her because of his position in the church," Washington County prosecutor Jamie Kreuser said, according to the Star Tribune.

In order to save his religious reputation, Allwine allegedly took matters into his own hands and searched the dark web for answers. There, the preacher found Besa Mafia, a website that offered murders and assaults in exchange for money. The website was allegedly run by an Albanian organized crime group.

Allwine reportedly made a username, “dogdaygod” and requested a hit on his wife -- but he wanted it to “look like an accident.” The preacher allegedly paid the shady hitmen $6,000 in bitcoin for the murder but the website appeared to be fake and the hit was never carried out, authorities said.

“We have zero information at this point that any of the hits that were ordered on that website were actually carried out,” a detective told FOX9. “In fact there is pretty good evidence, I think, that it was just a scam.”

In August 2016, Allwine "received a permit for a 9 mm Springfield XDS handgun,” authorities said.

PARENTS SLAM MINNESOTA DISTRICT ON FACEBOOK AMID SNOWSTORM

On Nov. 13, the preacher called emergency services and claimed he and his son found his wife shot dead. Investigators ruled out a suicide because there were no burns on the woman’s head and no gunpowder found on her hands, the Pioneer Press reported.

There were other problems, investigators soon discovered.

The gun was also found to the left of her although she was right-handed, officials said. The home’s surveillance video did not show anybody but Stephen Allwine coming and going from the residence. The victim’s body also contained a high quantity of scopolamine, a nausea drug, which can sedate a person if a high dosage is consumed.

And investigators allegedly found gunshot residue on Allwine’s hand -- though his defense attorney denies that charge.

Following the issuing of search warrants, investigators say they discovered a bitcoin address on Allwine’s computer and “dogdaygod’s” transactions with the shady supposed hitmen on his cellphone.

Defense attorney Kevin DeVore called the allegations “an amazing story, but it’s not TV.”

"It sounds like an amazing story, but it's not a TV show or a movie but real life," DeVore said. He also argued police “ruined” the crime scene when an officer removed the gun.

The trial will continue in Washington County this week.