There's nothing defensible about the case playing out in Virginia, in which authorities were granted a warrant by a judge to force a 17-year-old boy to have an erection and be photographed for evidence.

The evidence — which would have been collected by forcing the boy to endure an injection to induce an erection (yes, abuse) — was sought for comparison with a video the 17-year-old is accused of sexting his 15-year-old girlfriend. Following a torrent of media criticism, the Manassas City police department announced that it would not carry out the procedure after all, and rightly so. However — and this is crucial — the warrant was granted, making it legal for the police to have forcibly induced the boy's erection and take photos of it.

The approach of reproducing an illicit photograph of the young man relies on a sick logic in which the law exempts itself from moral agency and shows itself instead to be a conviction-hungry machine.

Being chemically forced to get an erection in front of a group cops should be an act confined to the deepest circle of hell, not an idea conjured by prosecutors. And while the case appears unusual (and certainly cruel) it does not stand alone as an instance of prosecutorial coercion.

The 17-year-old technically had a choice. He could, in penance for sexting his also teenage girlfriend, plea out to two felony charges in juvenile court for manufacturing and distributing child pornography. He could be jailed until he is 21. He could, should a judge so decide, be put on a sex offender registry for life. Plead guilty to felony sex offense charges or fight the charges and let the authorities inject your penis erect and take pictures — a rock and a hard place (pun intended).

This Virginia case is representative of a system in which striking a plea deal with prosecutors, accepting the mark of a "felon" or "criminal," is pushed on the vast majority of offenders. Nearly 95 percent of criminal cases in the US end in a plea deal rather than go to court. The legal system is hungry for easy convictions. Minimum mandatory sentencing laws mean that for defendants in many cases, the risk of a not-guilty verdict in court is simply too high to turn down plea deal.

Those who demand their day in court and refuse a plea are often punished. The late computer programmer Aaron Swartz fought prosecutorial pressure to plea out to a felony conviction for cybercrimes (for mass-downloading academic articles). He faced potential decades in prison by risking taking his case to court. Instead, the 26-year-old hanged himself. In the days after his death, Swartz's family wrote a public letter decrying "a criminal justice system rife with intimidation and prosecutorial overreach."

This time in Virginia we see another perverse overreach on behalf the justice system. A teenager could have been forced to either agree to call himself a felon and a sex offender or fight the charge by enduring outright abuse at the hands of police.

I am not suggesting the 17-year-old is beyond censure. According to the police, the young man repeatedly sent illicit images after being asked to stop. Unwelcome sexual advances should not be passed over lightly. The term "sext" is perhaps too frivolous to capture the potential harm done by a barrage of unwanted explicit content.

"You have to take every case seriously," John Shehan of the National Center for Missing and Exploited Children told the Washington Post. "But you have to look at different scenarios…. We don't think a blanket policy of charging all youths is going to remedy the problem."

It seems uncontroversial to note that no problem will be remedied by the production of more sexually explicit images of teens in this case — not by forcing a young man to endure a traumatizing procedure for evidence, not by coercing the teen to opt into a life with the label "felon" or "sex offender." Such justice produces only more harm.

To be sure, the Manassas City police has stated it is not their policy to "authorize invasive search procedures of suspects in cases of this nature." This case will not mark a change in policy. The boy will not have to have his penis forcibly made erect for the authorities' perusal. What is significant, nonetheless, is that a court of law found it acceptable to grant a warrant authorizing such a coercive cruel procedure.

Follow Natasha Lennard on Twitter: @natashalennard