Mark Gonzalez had never prosecuted a single case before he was elected district attorney of Nueces County, Texas, last November.

The 37-year-old self-described "Mexican biker defense lawyer" spent his first decade in law poking holes through bad cases and defending low-level offenders from what he viewed as unnecessary prosecutions and unduly harsh penalties. So when the 2016 election season approached, Gonzalez thought the Nueces County district attorney's office was ripe for an overhaul.

To say Gonzalez isn't the archetype for the chief criminal prosecutor for the southern Texas county is an understatement. He's covered in tattoos — the words "Not Guilty" stretch from shoulder to shoulder in jagged type, and his left forearm is inked with a portrait of Moses because, as his clients say, "he sets people free." He spends his free time riding one of his three Harley-Davidson motorcycles along the barren Texas highways with the Calaveras Motorcycle Club, a group some of his critics called a "biker gang." And at 19, he was arrested for a misdemeanor, driving while intoxicated. He keeps his mugshot framed in his office.

But there he was on January 5, in a tiny courthouse in his hometown of Agua Dulce, sworn in while wearing a Dallas Cowboys jersey in a private ceremony in front of his family.

Gonzalez's inexperience and tattoos didn't matter to Texans — they liked what he had to say.

Gonzalez beat a tough-on-crime 29-year Democratic incumbent and an experienced Republican prosecutor by calling for reform. He said he planned to eliminate a notorious court backlog by choosing cases more thoughtfully and making better and fairer deals with defendants. He spoke of offering treatment, education, and job training to low-level offenders rather than jail time, and refocusing police officers on serious crimes.

In short, he wanted to get "smart on crime." And he's far from alone in Texas, where the political conditions have allowed for a Republican-controlled legislature to push through a series of criminal-justice reforms.

Over the past decade, Texas, a state once infamous for its ruthless, lock-'em-up justice system — it had the country's fastest-growing prison population throughout the 1990s — has staked out a hard-earned, bipartisan consensus: The state's bursting prison population has been expensive, counterproductive in reducing crime, unsatisfying for victims, and devastating for the families and communities of the incarcerated.

"It was perfect timing," Gonzalez told Business Insider of his surprise election win. "People realized what we were doing wasn't working, so what do we have to lose by trying something different?"

'This is not a Republican or Democratic issue'

A prison in Huntsville, Texas. Reuters/Richard Carson Doug Smith, a policy analyst at the left-leaning nonprofit Texas Criminal Justice Coalition, has dedicated his career to crafting reforms to help the incarcerated.

The Austin native has a personal stake in the battle. He would likely still be in prison if it weren't for recent reforms implemented in Texas.

Smith, a former social worker and University of Texas at Austin professor, was imprisoned in 2009 on a 15-year sentence for a string of robberies that he says were the result of a crack-cocaine addiction and mental illness.

Three of those robberies had been committed while Smith was on probation, and although he hadn't used a deadly weapon, he was sentenced harshly.

"I was about the worst risk you could think of, someone with a substance abuse disorder who has a relapse history and a revocation history," Smith told Business Insider. "Not a great candidate for parole."

But people like Smith — an educated, rehabilitated ex-offender with meaningful employment, dedication to treatment, and bright prospects — were exactly the reason legislators like Democratic state senator John Whitmire and Republican representative Jerry Madden introduced a bill in 2005 that launched Texas' landmark attempt to overhaul its criminal-justice system.

In the mid-2000s, the Texas prison population was skyrocketing. Texas prisons filled to 97% capacity by 2005, with estimates suggesting the state would need room for 17,000 more inmates within a decade. By 2010, the population reached an all-time high of more than 170,000 state and federal inmates.

Madden and Whitmire argued that the situation was neither effective nor cost-efficient, and that expanding prisons wasn't the answer. Their bill called for allocating millions to treatment programs and specialized supervision for probation, while also calling for a reduction in prison terms for certain probationers.

"This is not a Republican or Democratic issue," Madden would later say of the legislation. "It's about what's smart for Texas."

The bill, an adjusted version of which became law in 2007, kick-started a series of legislative efforts over the next decade that have dropped the prison population by about 10,000 inmates in five years and helped put people like Smith back on their feet.

Smith was released years early, in 2014, thanks to reforms that allowed for certain prisoners to be released, so long as they were placed under intensive supervision.

"While I was incarcerated, the idea that parole was a given, or that you would be given an opportunity for rehabilitation was unheard of. And I was in prison when this began to shift," Smith said. "I was a beneficiary of that."

Forging bipartisan consensus

Right on Crime director Marc Levin. Associated Press/Carlos Delgado Until 2005, criminal-justice reform had been nearly impossible to pass in Texas, as was the case in many conservative states.

Reformers were derided as "soft on crime" while even popular bills ran into vetoes from Republicans like Gov. Rick Perry, budget crises, and tough-on-crime district attorneys, many of whom view securing harsh sentences as a metric of success.

But with Texas's prisons bursting at the seams, legislators were faced with a choice: reduce incarceration with reforms or funnel billions into new prisons.

At the same time, a new movement emerged among conservatives, led by Marc Levin, the director of the Right on Crime campaign created by the right-leaning Texas Public Policy Foundation. Levin, an Austin-based attorney and public-policy expert, and other conservatives like him understood ideas such as addressing substance abuse with treatment rather than incarceration, and promoting parole, probation, and reentry programs, as inherent to conservative ideology, not antithetical to it.

Meanwhile, fiscal conservatives in the state had grown appalled by the taxpayer burden of funding and maintaining new prisons, while libertarians were cynical of the broad government power required to funnel vast numbers of Texans through prisons each year.

Social conservatives like Prison Fellowship, an evangelical Christian organization founded by Chuck Colson, a former Watergate-era felon, approached reform after witnessing through their prison-ministry programs how rarely inmates were given opportunities for redemption.

"You really had a point where the only thing that was standing against reform from the conservative perspective ... would just be the muscle memory of being 'tough on crime' for decades," Derek Cohen, the deputy director of Right on Crime, told Business Insider.

What propelled reform forward, however, was that those groups were able to join with liberals long clamoring for change in the Republican-controlled state. The movement formed the Texas Smart On Crime Coalition to push their agenda in the statehouse and, while the coalition is bipartisan, that doesn't mean they agree on everything.

The movement can be thought of as a sort of Venn diagram. Liberals, conservatives, and religious groups each have their own reform plans, and they work together on issues where there is broad agreement, while still vehemently opposing one another where values diverge.

"This shows that just because it's bipartisan doesn't mean that it's compromise," Cohen said. "We're retaining our perfect circles and just in the few places that they overlap, that’s where we're working together."

Common issues like bail reform, rehabilitation and treatment programs, and prosecuting youths through juvenile rather than adult courts are all fair game for collaboration. But issues like "mens rea reform," or requiring more proof of a defendant's culpable mental state, are more polarized. Similarly, en masse sentence reductions for drug crimes and "ban the box" initiatives — some of which impose civil or criminal penalties on employers that ask about applicants' criminal histories — remain partisan battlefields.

Cohen said the key to unlocking reforms in Texas has been that most Americans, whether conservative or liberal, just want a system that works.

"They want a system that shows that that behavior is morally blameworthy ... but also that which rehabilitates," Cohen said. "There isn't this monolithic, punitive impulse in Texas or in conservatives or liberals or anywhere in the country."

Smith, the policy analyst for the left-leaning TCJC, recalled being incarcerated in Texas' Huntsville Unit as the Texas reform movement turned bipartisan. When groups like Right on Crime began talking about how over-incarceration represses human potential and fails the communities it's supposed to protect, Smith said he knew progress was coming.

"I'm reading about these things from the inside, and I can't tell you how moved I was that this was the message that I was hearing from the conservative community," Smith said.

Reform in the age of Trump

President Donald Trump and Attorney General Jeff Sessions. Reuters/Kevin Lamarque Texas' smart-on-crime crusade has come to be viewed as a model for conservative states like Louisiana, Georgia, and Kentucky, which all recently passed major reform packages.

Those efforts come even as President Donald Trump and Attorney General Jeff Sessions have embraced a tough-on-crime agenda that has alarmed progressives and conservatives alike.

In May, Sessions directed US attorneys to seek the harshest charges and sentences against defendants and, last week, he rolled back Obama-era reforms to the policing practice known as civil-asset forfeiture — a way for the federal government to seize the assets of citizens suspected of criminal activity, even if they are not formally charged with a crime.

In many ways, the Trump administration is alone on criminal justice. Multiple Democrats and Republicans decried the civil forfeiture changes as unconstitutional and the sentencing directive as regressive.

The vast majority of conservatives and liberals agree that incarceration in the US has spun out of control. The country has, by far, the largest incarcerated population in the world at 2.3 million people.

Cohen, of Right on Crime, says he is "very optimistic" that federal reform could still happen soon. Last year, Congress came close to passing bipartisan reforms to mandatory minimum sentencing laws. Many reformers criticize the laws, which require prison terms of certain lengths for certain crimes, as cruel and counterproductive.

The effort stalled as Trump turned to tough-on-crime rhetoric in the election, scaring many Republicans into thinking they'd be painted as soft. It's not hard to see a rare bipartisan effort gaining momentum, particularly given the criminal-justice system's ties to the opioid crisis, which has seen an unprecedented spike in heroin and prescription painkiller abuse in recent years.

Lawmakers and the public alike have begun to recognize that the country cannot punish its way out of drug epidemics, Cohen said, adding that there has been "a very marked shift" toward seeing illicit drug use as an offense fueled by addiction, rather than a moral failing.

Houston lawmakers and representatives of Southwestern Baptist Theological Seminary helped celebrate the opening of the state’s first 4-year seminary program to operate entirely behind the walls of a Texas prison. Associated Press/Pat Sullivan

Whether or not federal reform is successful, many advocates think the more important arena for reforms lies in the states. Only about 200,000 of the more than 2 million people incarcerated in the US are locked up in federal prisons.

Kate Trammell, the senior state campaign manager for Prison Fellowship, said that the Christian group is focusing its efforts on the state side, even as it pushes Washington for reform.

"States have been and will continue to be the laboratory of democracy, and Texas has really embraced that," Trammell told Business Insider, adding that Texas has become the success story that reformers show to those wary of change.

Louisiana, for instance, recently brought together conservative groups, liberal social-justice activists, business leaders, and religious organizations to win support for sentencing and parole reforms that sailed through the state's Republican-controlled legislature and were signed by Democratic Gov. John Bel Edwards in June. Louisiana anticipates a 10% jail-population reduction over the next decade as a result.

Reform has filtered to the local level too. Newly elected reformers like Gonzalez, the Nueces County district attorney, are beginning to make the day-to-day decisions of what charges to press, what cases to pursue, and who gets a second chance. The stakes are high — even a modest crime spike could torpedo the public's appetite for leniency to offenders — but Gonzalez is confident he knows the way forward.

"If you make a mistake and they're misdemeanor offenses, we hope you learn your lesson," Gonzalez said. "My standpoint is — the bad guys? We slam them … You need to make sure you don't mess up. Not in my county."