A federal judge overturned the conviction of so-called "cannibal cop" Gilberto Valle late Monday, and released him Tuesday pending $100,000 bail.

Valle hugged his lawyers and waved to family members in court Tuesday. He is expected to be released Tuesday to home detention at a relative's home in Queens.

Valle was convicted in March 2013 of planning to kidnap, torture and eat women he chatted with online, with the most serious charge, conspiracy to commit kidnapping, carrying a potential sentence of life in prison. Valle had not yet been sentenced while appealing his conviction.

Judge Paul G. Gardephe of Federal District Court in Manhattan issued an acquittal on kidnapping conspiracy, writing in a 118-page opinion that there was no evidence that Valle planned to go beyond fantasy.

Gardephe upheld the misdemeanor charge that Valle had illegally accessed law enforcement databases. That charge carries a maximum sentence of one year in prison, and Valle has already been in prison since his arrest in October 2012.

Lawyers for Valle had argued the former NYPD officer, who belonged to an online fantasy group that discussed how to torture, kill and eat women, had never planned to act out on the fantasies.

Prosecutors, however, said that he created a list of up to 100 victims, looked up potential victims on NYPD's database, researched how to sedate someone with chloroform, and even staked one alleged potential victim out. Valle's wife, who said she had no knowledge of his plans, had testified for the prosecution.

Prosecutors said Tuesday that they plan to appeal the judge's decision.

--with Newsday