A man imprisoned for nearly two decades was set free yesterday after investigators uncovered evidence that the shady NYPD detective who arrested him coached witnesses and beat a confession out of him.

37-year-old Sundhe Moses was convicted in 1997 of shooting and killing a 4-year-old girl in Brownsville. He was sentenced to 15 years to life, and has served 18 years thus far. But Moses was arrested by Louis Scarcella, the Brooklyn detective who has had 50 murder convictions called into question after it was revealed he was coaching and recycling witnesses and beating confessions out of suspects, among other accusations.

Moses, who says Scarcella is "a really dirty cop," claimed in the 1997 trial that Scarcella physically abused him to get him to sign a confession he did not write. Earlier this year, Moses hired attorneys to help reopen his case, and a 26-year-old lawyer tracked down one of the case's key witnesses who recanted his testimony, telling investigators detectives had coached him beforehand.

Moses was granted parole on October 31st, and left his upstate prison to return to his Brooklyn home yesterday. "It was snowing, but it was like a great weight being lifted off my shoulders,” he told the Daily News about leaving prison. “I walked out and everything was new.”

Earlier this year, the court released David Ranta, who had been imprisoned for 23 years for a murder he did not commit, from prison after discovering Scarcella and other detectives on his case had coached witnesses and otherwise mishandled it. Brooklyn DA Charles Hynes has since ordered a review of 46 of Scarcella's murder convictions.