The NYPD dropped sex- crime charges against a bartender busted for one of the Park Slope gropings — an embarrassing setback in the high-profile case that has Brooklyn detectives scrambling for fresh clues, law-enforcement sources told The Post.

Joshua Flecha, 32, of Queens, was cleared of forcible touching and sexual abuse after the May 7 victim told cops she wasn’t sure about her positive lineup ID.

“This was torture,” Flecha said early today (pictured) as he left Brooklyn Supreme Court after being arraigned on the only charge he still faces: a misdemeanor marijuana-possession rap.

“I don’t know how to deal with the situation, I’m just trying to clear my name. I’m 100 percent innocent,” he said.

The voided arrest is a huge hit for detectives desperate to solve the baffling, 20-attack pattern that has terrified women across a wide swath of Brooklyn.

“It’s gone from bad to worse,” a law-enforcement source said. “That’s going to put a lot of pressure on the Police Department.

“Now the next person they arrest, the credibility of the victim will be under a microscope.”

Flecha was collared Monday, and once he was picked from the first lineup, police believed they could tie him to at least five other gropings.

The Heartland Brewery bartender was put through several more lineups at the Brooklyn Special Victims Unit, but none of those victims picked him out. He is now clear of any sex crimes.

Flecha was nabbed at around 3:15 a.m. after cops spotted him with his pants unzipped and porn playing on his cellphone as he stood on 17th Street between 10th and 11th avenues, cops said.

Flecha was found with pot and a bottle of Jack Daniel’s, cops said.

Cops thought he was a dead ringer for the suspect in the May 7 attack, and the victim later picked him out of a lineup before changing her story.