A judge dismissed the case against seven-year NYPD veteran Vladimir Sosa after prosecutors failed to prove he had a sexual ­relationship with the girl.

“There was not enough credible evidence to prove the charges beyond a reasonable doubt,” said a spokeswoman for the Bronx District Attorney’s Office.

Officials declined to elaborate on why the case against Sosa ended in a dismissal. But the cop’s lawyers last month said they submitted an audio recording in which the girl admits that she was 17 — not 16 — when her relationship with Sosa began.

The victim claimed that Sosa used his position at a local church to lure her into having sex with him.The 46th Precinct cop allegedly met the girl who was attending a youth program at the church where he worked as a pastor.