As the idiom “you can’t have your cake and eat it too” suggests, we’re properly conditioned to detect stories that are too good to be true. But Texas has proven it’s possible to have both much lower crime and a lower rate of imprisonment. Indeed, Texas’ FBI index crime rate, which accounts for both violent crime and property crime, has fallen more sharply than it has nationally, posting a 29 percent drop from 2005 to 2014, the latest full year for which official data is available.

So how did Texas close three prisons while making its streets safer? By making alternatives to incarceration for nonviolent offenders more available and effective. The two of us had front row seats to the action in 2007, when the chairman of the House Corrections Committee was tasked by Texas House Speaker Tom Craddick (R-Midland) to find a way to protect public safety without building new prisons. We collaborated with then Governor Rick Perry, Senate Criminal Justice Chairman John Whitmire, and other leaders to push through this transformation.

To understand how it worked, we must first examine the arc of the prison boom. One major reason the prison population in Texas and across the nation grew six-fold from the mid-1970s to the mid-2000s is that proven alternatives were scarce with prison construction and operation costs consuming ever greater portions of state criminal-justice budgets. As more money went into prisons, less and less money was left for probation and other alternatives to incarceration. Texas showed the nation how to escape this cycle while improving public safety.

There are three main reasons prosecutors and judges might send someone to prison: 1) They believe imprisonment is the most just and effective sentence; 2) They’re required to do so by a statute that specifies a mandatory minimum prison term; or, 3) There are no proven and effective alternatives to prison available. The third reason is key to appreciating what Texas — and, subsequently, many other conservative states such as Georgia and South Carolina — achieved in both crime reduction and incarceration.

In January 2007, Texas projected that the state would need to allocate billions for the construction and operation of prisons, including more than 17,000 additional prison beds by 2012. Legislators also heard testimony from prosecutors and judges stating that low-risk, nonviolent offenders were often sent to prison for lack of effective alternatives. These criminal-justice professionals cited unwieldy probation caseloads along with lengthy waiting lists for drug courts or mental health treatment options, which make it difficult to supervise and treat offenders effectively.

Given Texas’ long tradition of prosecutorial and judicial discretion with little in the way of mandatory minimums, the path forward became clear. Texas policymakers worked with experts and across party lines to assemble a budget package that provided a historic expansion of diversion and treatment programs. The front end items included 800 new residential substance abuse treatment beds and 3,000 more outpatient substance abuse treatment slots — all to be used as initial options after sentencing and for those whose addiction problems undermine their compliance with community supervision.

The other piece of the package involved the back-end of the criminal-justice system. Lawmakers found that the Board of Pardons and Paroles had been paroling fewer inmates because they weren’t confident parole candidates were getting the necessary treatment in prison. The Board was also revoking an increasing number of parolees because they had few other options. In fact, thousands of inmates approved for parole had to be wait-listed for either halfway houses or in-prison treatment programs, conditions of parole. The result? Overflowing prisons. So lawmakers filled the gap, adding 2,700 substance abuse treatment beds behind bars, 1,400 new intermediate sanction beds (a 90-day program for probationers and parolees with technical violations such as missing appointments), and 300 halfway-house beds. They also capped parole caseloads at 75 to ensure closer supervision.

This was a major shift from the last three decades. Previously, Texas lawmakers responded to projected increases in the need for prisons simply by building more lockups. As a result, the state’s prison population rose from 19,000 in 1975 to more than 155,000 in 2007. The new approach has exceeded expectations both for public safety and cost control. Rather than build more prisons, Texas has since closed three and is looking at additional closures as the population continues to shrink. Most importantly, crime has declined more in Texas than it has nationally or in states without significant criminal-justice reform programs.

An even a better measure of the efficacy of these reforms is the performance of those placed on supervision. In 2007, 15.9 percent of probationers failed and were revoked to prison, a figure that fell to 14.7 percent by 2015. Thus, as more nonviolent offenders were diverted to probation instead of prison, probation success rates climbed. This likely stemmed from a combination of improved supervision — for instance, the use of graduated sanctions such as curfews to promote compliance — and court officials’ assessment that many of these individuals could succeed given the right resources in the community. The gains in parole are even more impressive: Even with 11,000 more people on parole today than in 2007, more than 17 percent fewer crimes are being alleged against parolees now than then.

It’s true that the national index crime rate fell 20 percent from 2007 to 2014. But Texas did even better. And its 26 percent drop was effected without spending money on new prisons and while shuttering some old ones.

Texas’ pioneering success has not gone unnoticed. But it’s not the only example of reducing crime and incarceration simultaneously. In fact, from 2008 to 2013, states that reduced incarceration rates achieved a13 percent drop in crime, whereas those that increased rates saw an 11 percent drop.

Texas’ diversion efforts target nonviolent, low-risk offenders who are typically given short prison sentences. The reason is that recidivism in this group can often be lowered by interventions such as drug court in lieu of prison. Indeed, many of these offenders become more threatening to the public when incarcerated because they become disconnected from employment and family and exposed to a tough prison crowd. In this way, incarceration can be “criminogenic” for certain offenders — prison itself can create more criminals.

With advancements in technologies and techniques ranging from electronic monitoring to non-narcotic treatments for opioid addiction, states have choices beyond mere imprisonment or a toothless response to lawbreaking. Texas is proof positive that by filling the spectrum in between these two extremes with effective monitoring and treatment programs, we can both enhance taxpayer responsibility and increase the safety of our communities.

The Hon. Jerry Madden (R-Plano) served as Texas House Corrections Chairman at a time when Texas passed major criminal-justice reforms into law; he served in the Texas House of Representatives from 1993 to 2013, and is a senior fellow for the Texas Public Policy Foundation’s Right on Crime initiative.Marc Levin is the director of the Center for Effective Justice at the Texas Public Policy Foundation where he leads the foundation’s Right on Crime initiative.