District attorney races are going off script,” Stanford Law School professor David Alan Sklansky wrote in a recent law journal article. For years, DAs who took a tough-on-crime stance by racking up convictions could usually count on being reelected. But something seems to be changing, and evidence of it could be found, Sklansky wrote, this past March in the Democratic primary for Nueces County district attorney. On one side, there was incumbent Mark Skurka, a 29-year veteran prosecutor best known for his conviction of Selena’s murderer, Yolanda Saldivar. “Mark Skurka is tough on criminals because they are tough on us,” a voice intoned in his reelection campaign’s TV ad. “When Mark Skurka goes to court, criminals go to prison.”

On the other side, there was Mark Gonzalez, a heavily tattooed Corpus Christi defense attorney whose ink includes a stylized “Not Guilty” on his chest, a reminder, he said, of the importance of the presumption of innocence. The Nueces County DA’s office has had serious problems lately, such as well-publicized allegations of failing to hand over exculpatory evidence to defense counsels and high turnover rates among prosecutors. Gonzalez’s campaign highlighted those issues, and Skurka’s campaign highlighted Gonzalez’s lack of prosecutorial experience and his tattoos. To the surprise of many, Gonzalez won by 12 points.

“I never thought I would be here right now—it’s crazy,” the 37-year-old Gonzalez said in his small law office. On the wall behind his desk was a likeness of the Mexican revolutionary Emiliano Zapata. On the opposite wall was a different kind of art: mug shots of a young, smiling Gonzalez. “I probably have more in common with my defendants than with my colleagues across the bar,” he said, pointing to the photos. “That was me when I was nineteen. I don’t forget these things. Everyone needs a little help.”

Gonzalez was born and raised in the tiny town of Agua Dulce, about half an hour west of Corpus. One day, after drinking with a friend in nearby Kingsville, he got pulled over. “I didn’t know any lawyers,” he said. “I asked my mom, ‘What do I do?’ She said, ‘Just plead guilty, mijo, and they’re gonna be nice to you. I promise.’ ”

He got a plea deal. At the hearing, he saw a Navy pilot who’d been charged with drunk driving too—and watched as a slick lawyer got his case dismissed. “I knew from that day I was gonna be a defense attorney,” he said. So he went to Texas A&M–Corpus Christi, and then to law school at St. Mary’s, in San Antonio, and eventually set up shop in Corpus. He made $12,000 his first year but slowly built up a successful regional practice.

Over time, he said, the dysfunctions at the DA’s office started to grate on him. “I wasn’t getting evidence in a timely way, or at all sometimes,” he said. Gonzalez pointed out that the office brings so many bad cases—“they throw something at the wall and see what sticks”—that he can hardly blame prosecutors for failing to properly investigate cases and disclose evidence. They don’t have time. He wants the office to be more thoughtful about choosing cases and making fair deals, and he argues that his experience is a huge asset. “I’ve poked holes in these cases for ten years,” he said. “I know  exactly how to fill these holes.”

Gonzalez’s opponent in the general election is Republican James Gardner, who better fits the archetype of a DA. A Michigan native who has lived in Texas for 25 years, Gardner served for 5 years under Skurka and recently spent 2 years in Afghanistan training lawyers and judges. Sitting for an interview at a Corpus Christi steakhouse, he declined to be recorded—he was worried that the tape could be altered sometime in the future to make him look bad—yet spoke animatedly about his plans. He agreed with many of Gonzalez’s complaints about the DA’s office but offered alternate remedies—for one, he wants to significantly raise salaries to keep prosecutors from leaving for bigger cities.

The race is likely to be close. More than 60 percent of Corpus Christi’s population is Hispanic, but the city has problems with low voter turnout; Nueces County went narrowly for Mitt Romney in 2012. And looming over the contest is not only shifting attitudes toward criminal justice but the specter that has haunted the entire election season: Donald Trump. Gardner, a big fan of Trump’s style, talks excitedly about the enthusiasm he sees in the area’s Republican voters, while Gonzalez hopes Trump’s presence will inspire Hispanics to show up at the polls. Still, he knows that in a year when the presidential contest is so noisy, it’s tough for a down-ballot race to get much attention. “A lot of people don’t even know what the DA does,” he said. “But once you get affected by it personally, you wake up.”