If this were happening in any other country, Americans would be aghast. A sentence of life in prison, without the possibility of parole, for trying to sell $10 of marijuana to an undercover officer? For sharing LSD at a Grateful Dead concert? For siphoning gas from a truck? The punishment is so extreme, so irrational, so wildly disproportionate to the crime that it defies explanation.

And yet this is happening every day in federal and state courts across the United States. Judges, bound by mandatory sentencing laws that they openly denounce, are sending people away for the rest of their lives for committing nonviolent drug and property crimes. In nearly 20 percent of cases, it was the person’s first offense.

As of 2012, there were 3,278 prisoners serving sentences of life without parole for such crimes, according to an extensive and astonishing report issued Wednesday by the American Civil Liberties Union. And that number is conservative. It doesn’t include inmates serving sentences of, say, 350 years for a series of nonviolent drug sales. Nor does it include those in prison for crimes legally classified as “violent” even though they did not involve actual violence, like failing to report to a halfway house or trying to steal an unoccupied car.

The report relies on data from the federal prison system and nine states. Four out of five prisoners were sentenced for drug crimes like possessing a crack pipe or acting as a go-between in a street drug sale. Most of the rest were sentenced for property crimes like trying to cash a stolen check or shoplifting. In more than 83 percent of the cases, the judge had no choice: federal or state law mandated a sentence of life without parole, usually under a mandatory-minimum or habitual offender statute.