Prosecutors have dropped rape charges against two immigrant teens — one in the country illegally — because their alleged victim’s story fell apart.

Ninth-graders Jose Montano, 17, and Henry Sanchez Milian, 18, were accused of pushing a female classmate into a Rockville, Maryland, high school bathroom and violently raping her in March, fueling fiery national debate over immigration policies because both suspects were from Central America and Sanchez Milian was here illegally.

But officials dropped the charges Thursday, because school surveillance images and texts sent from the supposed victim to her alleged attackers raised doubts about the girl’s story, the Washington Post reports.

“At no point did the girl express any reluctance with any sex acts,” said Sanchez Milian’s attorney Andew Jezic. “From the night before, she actively planned a sexual encounter.”

Prosecutors are still charging Sanchez Milian with possession of child pornography over racy images of the female victim on his phone.

But his attorney says the victim willingly shared the pictures with Montano, who then passed the lewd photos to Sanchez Milian, and the smut charges are a last-ditch effort to target the immigrant teens, Jezic said.

“This is selective prosecution of elective promiscuity,” he said. “It is hardly uncommon behavior for teenagers.”