New York City Mayor Bill de Blasio’s promise to close the notoriously overcrowded and brutal Riker’s Island jail made national news last month, but less famous policymakers all over the country struggle with jail overcrowding on a regular basis (see, for example, Kansas, Indiana and Upstate New York).

This raises an intriguing question: If jails are for criminals, why are there still so many people behind bars after decades of declining crime? The answer is both surprising and disturbing.

According to the most recent data from the U.S. Bureau of Justice Statistics, the number of U.S. jail inmates rose from 621,000 in 2000 to 744,600 in 2014. According to the data, this increase was not driven by the jailing of more convicted criminals. Instead, jails are now overflowing with people who are awaiting trial. These individuals, who may be innocent of the crime they’re charged with, account for 95 percent of the growth in the jail population over the past 15 years.

Adjusting for growth in the overall U.S. population, the incarceration rate per 100,000 for jailed convicts dropped 11 percent from 2000 to 2014, but the rate for those in jail who have not been convicted of a crime has risen 17 percent over the same period. That’s a formula that keeps jails crowded with inmates in an era of diminished crime.

Why are jails clogged with so many people who have been charged but not tried? A study by the Vera Institute for Justice noted that judges are less willing today than in previous eras to release individuals charged of crimes on their own recognizance. Instead, judges more commonly set cash bail amounts that many defendants can’t pay. These individuals (who, again, may be guilty of nothing) languish in jail. In the worst cases, the wait can be shamefully long, for example the three traumatic years served by former Rikers inmate Kalief Browder, who took his life after his release.

In an effort to reduce jail crowding and provide equal justice to low-income people who cannot afford bail, some states are rethinking bail. New Jersey has virtually eliminated cash bail, and the California Legislature is considering a similar step.

Obviously, some people charged with crimes are dangerous to others or pose a serious flight risk, and therefore, they need to be held in jail until their trial. But simply returning the ratio of unconvicted people to convicted people who are in jail back to what it was in 2000 (1.29:1) would still allow violent defendants to remain incarcerated while simultaneously releasing 100,000 nonviolent defendants on their own recognizance until trial. Not incidentally, that’s 10 times the number of inmates on Riker’s Island.

Keith Humphreys is a professor of psychiatry at Stanford University in California.