The wife of the former New York police officer known as the “Cannibal Cop” has told a court how she learned her husband was planning to kill and eat her.

The trial of Gilberto Valle opened on Monday in Manhattan with the testimony of his estranged spouse, 27-year-old school teacher Kathleen Mangan-Valle. Mr Valle, 28, is charged with plotting online to kidnap, rape, kill and cannibalise scores of women, including his wife.

The couple met on a dating website and were married last year, soon after the birth of their daughter. At first, Mrs Mangan-Valle told the court, the relationship was full of “fun, laughter”, but then “weird stuff” started happening.

Download the new Independent Premium app Sharing the full story, not just the headlines

Mr Valle, she said, would stay up until 5am surfing the internet. He began to ask about her jogging routes, and whether they were well-lit or busy. Suspicious, she installed spyware to keep track of her husband’s web browsing habits.

In September 2012, she made a shocking discovery: Mr Valle had been visiting a fetish website that contained pictures of women being tortured. One photograph, she was convinced, showed a dead girl.

As she explored further, Mrs Mangan-Valle found her husband had been exchanging electronic messages with others, in which he detailed plans to torture and kill women, including herself and some of her friends.

“I was going to be tied up by my feet and my throat slit, and they would have fun watching the blood gush out of me,” she said. Another member of the chatroom had suggested to Mr Valle that, if his wife cried, he shouldn’t listen. “Don’t give her mercy,” he was told.

In his online conversations, Mr Valle had outlined plans to abduct one of his wife’s friends in a suitcase before murdering her. One of his alleged targets was an 18-year-old high school pupil whom he described as “the most desirable piece of meat I’ve ever met”, saying she was small enough to fit into his oven.

Two more women were to be raped simultaneously to “heighten” their fears, while others were to be roasted on a spit, with the chatroom members taking 30-minute cooking shifts. Mrs Mangan-Valle said: “The suffering was for his enjoyment and he wanted to make it last as long as possible.”

After discovering the extent of her husband’s depravity, Mrs Mangan-Valle reported him to the FBI, and then fled with the couple’s daughter to her parents’ home in Nevada. Both wept openly as Mr Valle’s defence lawyer showed the court a photograph of the defendant feeding the child.

The trial rests on whether Mr Valle was planning to carry out the crimes he discussed online, or whether, as his defence argues, they were merely fantasies. He has been charged with illegally accessing a law enforcement database to gather information on his prospective victims.

He also allegedly searched the internet for advice on chemicals to render people unconscious, ropes to tie them up, and the properties of human flesh. Yet there is no evidence that any of the women he mentioned have been harmed, let alone kidnapped.

The case throws light into the darker corners of the internet, including a website with 38,000 members, including Mr Valle, who, according to his lawyer, Julia L Gatto, discuss “suffocating women, cooking and eating them”. Ms Gatto said the case tests “bedrock principles, the freedom to think, the freedom to say, the freedom to write even the darkest thoughts from our human imagination”.

Another man is awaiting trial for allegedly conspiring with Mr Valle to kidnap, rape and kill; he also claims he meant no real harm. Mr Valle is expected to take the stand this week, and faces a possible life sentence if convicted.