NEW YORK -- A former New York City police officer whose bizarre online exchanges about kidnapping and eating women landed him behind bars and earned him tabloid infamy as the "cannibal cop" was sentenced to time served on Wednesday after telling a judge that the women were "never in danger."

Gilberto Valle had faced a possible life term after his 2013 conviction for kidnapping conspiracy. But U.S. District Judge Paul Gardephe threw out the jury's guilty verdict earlier this year, clearing the way for Valle to be sentenced on a misdemeanour charge of using a restricted law enforcement database to secretly look up personal information about women he knew.

Prosecutors are appealing Gardephe's decision to override a jury verdict.

At sentencing in federal court, Valle apologized to the women for putting them through the ordeal of testifying at his trial. He insisted his conversations about them in fetish chat rooms never went beyond role-play fantasies.

"I just hope they know they were never in danger," Valle said. "I would never do the things I talked about on the Internet -- never."

He told reporters outside court that he was eager to move on with his life. "My legacy is not going to be the story of the 'cannibal cop,"' he said.

Valle, 30, had already served 20 months in jail while awaiting trial. The judge sentenced him to one year time served -- the maximum for a misdemeanour -- and one year probation. He also was ordered to continue mental health treatment.

Valle was arrested in 2012 after his wife discovered disturbing material on his computer and reported it to the FBI.

Valle's "depraved, misogynistic sexual fantasies about his wife, former college classmates and acquaintances undoubtedly reflected a mind diseased," the judge wrote in his decision to throw out the kidnapping conviction. But, he added, prosecutors failed to prove he had entered into genuine agreements to kidnap the women and taken concrete steps to carry them out.