John Bacon and Michael Winter

USA TODAY

A day after a federal judge overturned his kidnapping conspiracy conviction, New York's notorious "cannibal cop" walked out of jail Tuesday after posting bond.

A jury had convicted former New York police officer Gilberto Valle last year on charges of plotting to kidnap, kill and eat his estranged wife and other women. But U.S. District Court Judge Paul Gardephe on Monday overturned the conviction on the most serious charge, citing a lack of evidence and calling the gruesome plans "fantasy role-play."

Gardephe let stand Valle's conviction on illegally using a police database. The maximum sentence for that crime is a year in prison; the conspiracy charge could have meant life in prison.

Stunned prosecutors said they would appeal.

"I want to take the opportunity to apologize to everyone who's been hurt, shocked and offended by my infantile actions," a smiling Valle, accompanied by his family and attorneys, told reporters after leaving Manhattan federal court.

Though he was freed on $100,000 bond, Valle, 40, will serve home detention at his mother's house in Queens. He will also be monitored electronically and undergo psychological treatment.

Vale "is guilty of nothing more than very unconventional thoughts," said Julia Gatto, one of his attorneys. We don't put people in jail for their thoughts. We are not the thought police."

Valle had been jailed for more than 18 months. The six-year New York Police Department veteran was arrested in 2012 and fired after his conviction.

Prosecutors had argued Valle looked up potential targets on a restricted law enforcement database.

Though Gardephe acknowledged that Valle's "depraved, misogynistic sexual fantasies about his wife, former college classmates and acquaintances undoubtedly reflected a mind diseased," he was unconvinced that Valle intended to follow through.

"It is more likely than not the case that all of Valle's Internet communications about the kidnapping are fantasy role-play," he wrote in a 120-page opinion.

Valle's estranged wife, Kathleen Mangan-Valle, testified at Valle's trial in February 2013 that the couple were newlyweds with a young child when she found online chats and other evidence on his computer showing he had discussed killing her and abducting, torturing and eating other women.

"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 because I was young," Kathleen Mangan-Valle, who was 27 at the time, told a Manhattan jury.

Mangan-Valle also read about plans to put one friend in a suitcase, wheel her out of her building and murder her. Two other women were "going to be raped in front of each other to heighten their fears," while another was going to be roasted alive over an open fire, she said.

"The suffering was for his enjoyment, and he wanted to make it last as long as possible," she told the jury.

Gatto had argued that Valle always had been aroused by "unusual things," including the thought of a woman boiled down on a platter with an apple in her mouth. He found a home at a fetish website with 38,000 registered members, where regulars discuss "suffocating women, cooking and eating them," she said. But it was all fantasy, his lawyer said.

Contributing: Associated Press