This month, when the president signed the “21st Century Cures Act” into law, our country moved toward ending the unfortunate and often tragic practice of substituting jails and prisons for a fully functioning mental-health system.

Progress can’t come soon enough for our state, where too many people with mental-health issues are forced into our criminal justice system because they can’t find help. Earlier this year, the Star Tribune helped to put a human face on this problem when it published a series about the growing number of Minnesotans facing mental-health crises who have been jailed or even killed in police encounters.

In the past several years, dozens of Minnesota law-enforcement leaders and mental-health experts have told me that our state and nation can no longer afford to ignore this costly problem.

The United States has only 5 percent of the world’s population, but 25 percent of the world’s prison population, in part because we’ve criminalized mental illness. The problem led Hennepin County Sheriff Rich Stanek to call our local jails “the largest mental-health facilities in the state of Minnesota.” He estimates up to 30 percent of inmates he supervises have mental-health conditions, and many belong in treatment programs.

The system is also unfair to the law-enforcement officers who are forced to intervene in mental-health crises and make snap judgments with little or no training. And it places a steep burden on taxpayers who must pay the court and incarceration costs of people who should be getting more cost-effective mental-health services.

In March, I met with Moorhead Police Chief David Ebinger, who described the crisis in his region by saying most people with mental-health issues don’t start to get treatment until they’re in the back of a police car or an ambulance. Without access to care, he says, placing these people in jail is often the most compassionate response they get. “These aren’t bad people,” he told me. “These are sick people.”

It’s the same story in communities across Minnesota, where police forces struggle to find resources to fully train officers to recognize and respond appropriately to mental-health issues, and where local health care systems search for the capacity to provide treatment.

Last year, Beltrami County Sheriff Phil Hodapp told me that of the 3,000 people booked into his county jail in 2014, more than 2,000 had mental-health issues. Rural communities like his need more crisis centers and beds for the mentally ill patients who now go to jail.

Last year, I met a Winona woman whose mentally ill son was killed during a police encounter. She, like many in law enforcement, is now a strong advocate for better police training.

And it’s not just law enforcement searching for help. A Bemidji hospital director told me at the same meeting that his emergency room sees three-to-four patients a day suffering a mental-health crisis, and they have no place to put them to get the care they need.

After many years of hearing from Minnesota families shaken by mental-health issues, as well as from mental-health and law-enforcement officials across the state, I’ve worked hard to educate my congressional colleagues about the problem. Many now understand how costly the current system is, how dangerous it can be for law enforcement, and how frustrating it is for families when a loved one gets caught up in the criminal-justice system.

Earlier this month, my bipartisan measure was passed by Congress as part of a comprehensive health care bill, and I was proud to watch President Obama sign it into law. My Comprehensive Justice and Mental Health Act will now bring more resources to law enforcement, the courts, and correctional facilities.

The effort will support mental-health courts and crisis-intervention teams, both of which save lives and money. The measure helps train officers to respond appropriately to a person with a mental-health condition. It also emphasizes corrections-based programs, like transitional services that reduce recidivism rates and screening practices that identify inmates with mental-health conditions.

We know full well that the place where our criminal-justice and our mental-health systems collide can be dangerous and costly. I’m proud to say that we’ll be able to make meaningful progress toward addressing this crisis now that this legislation is law.

Al Franken represents Minnesota in the U.S. Senate.