A California man is accused of using the dark web in an attempt to procure a chemical weapon to murder his wife, according to federal agents.

Charges were filed against 41-year-old Sanford Faison of Oakland after he allegedly posted online about finding the best method to kill his wife, according to court documents The Mercury News obtained Thursday.

“I aim to ensure my wife’s death within the 18 months, ideally long after our divorce is finalized (about six to eight months from now),” Faison allegedly wrote in a Dec. 3 post.

In the online forum, he claimed the plan was the “only way” to maintain full custody of his child.

“We currently live together, and I expect to have (easy) access to her environment and food for another two months at least,” he also allegedly wrote.

The husband was arrested Jan. 9 on suspicion of attempting to acquire a chemical weapon after he allegedly arranged a purchase online. But the seller was actually working for the FBI and sent Faison a package containing surveillance equipment, according to The Mercury News.

Court documents don’t identify the chemical weapon Faison planned to purchase, but said it was “a colorless, volatile, flammable and highly toxic liquid” that is “easily absorbed through the skin and may produce life-threatening systemic effects with only a single drop.”

He reportedly considered pouring the chemical into her coffee, using an eyedropper to dab some on her while she slept or placing it on her keyboard.

“I feel that [chemical #1] poisoning would reduce my culpability by delaying a final/accurate diagnosis and undermine any investigation,” he allegedly wrote, according to The Mercury News.

Following his arrest, Faison allegedly admitted to the plot, claiming he also considered hiring a hitman but believed it would cost as much as a divorce.

Faison — who worked at PayPal — remains in federal custody, according to the newspaper.