NEW YORK -- A New York City policeman dubbed the “cannibal cop” by local media planned to abduct, cook and eat a woman for Thanksgiving dinner, according to prosecutors who successfully moved to keep him behind bars without bail at a court hearing.

The defense attorney for Gilberto Valle, Julia Gatto, said that Valle’s musings were “disturbing” and “sick” but were merely fantasies and that he never intended to carry them out.

Valle, 28, was arrested in October after a two-month investigation by the FBI and the New York Police Department’s internal affairs division. Prosecutors said phone and computer records showed he had been building a database of women - complete with personal information and physical descriptions - as part of a plot to kidnap, torture, cook and eat them.

“This case is all the more disturbing when you consider Valle’s position as a New York City police officer and his sworn duty to serve and protect,” the U.S. attorney, Preet Bharara, said in a statement at the time.

In court Tuesday, prosecutors said some of Valle’s online conversations with a friend included the idea of getting “some girl meat” in time for Thanksgiving. “It’s a long way off, but I’m getting the plan in motion now,” Valle allegedly wrote, adding that he knew where his intended victim lived and would “grab her from her house.”

Judge Paul Gardephe denied bail for Valle.

Valle has pleaded not guilty to charges of conspiracy to commit kidnapping and to illegally accessing the federal National Crime Information Center. The FBI and police say he used his position as a police officer to access the Center to find potential victims. If convicted on the kidnapping allegation, he could face life in prison.

The FBI has conceded that no women were ever harmed but that there was a “great deal of intent” by Valle, who had been assigned to a police precinct in Harlem.

“There is nothing about this case that is rational,” Gardephe said at the hearing, according to media reports. “It is depraved, bizarre and aberrational, and at the moment it is unexplainable - especially by someone who is a police officer.”

Valle’s trial was set for Jan. 22.