Fort Worth Star-Telegram via Getty Images Rosa Maria Ortega was sentenced to eight years in prison for voting illegally, even though she said she didn't know she was breaking the law.

A Texas appeals court last week refused to overturn the conviction of a 39-year-old mother of four who has been sentenced to eight years in prison for illegal voting. She could also be deported.

There’s little dispute that Rosa Maria Ortega did in fact break the law. Ortega came to the United States from Mexico as a baby and was living in the U.S. as a legal permanent resident. Although it’s against the law for non-citizens to vote in Texas, Ortega registered to vote in 2002 as a Republican and then cast ballots multiple times over more than a decade. She tried to register again after moving in 2014, which is when state investigators noticed something was amiss. They arrested her in January 2016.

To Texas Attorney General Ken Paxton (R), this is an open-and-shut case of voter fraud ― Ortega lied about being a citizen, voted multiple times and now is being punished.

But the evidence in Ortega’s case tells a far more complex story and illustrates the enormous discretion that prosecutors have in pursuing incidents of voter fraud.

Throughout her trial, Ortega maintained that she had no idea she couldn’t vote. She said she didn’t know the difference between a U.S. citizen and a legal permanent resident. She was brought to the United States when she was very young and two of her brothers were born in the U.S. According to one brother, her entire family thought she was a citizen.

“She has a sixth-grade education. She didn’t know she wasn’t legal,” Ortega’s lawyer told The New York Times in 2017. “She can own property; she can serve in the military; she can get a job; she can pay taxes. But she can’t vote, and she didn’t know that.”

When Ortega first tried to register at her new residence in 2014, she indicated on her application that she was a non-citizen. Because she checked that box, a local election official sent her a letter saying she was ineligible to vote. Since Ortega had voted before at her old address, she called the local election office to find out why she was being rejected. After learning it was because she’d checked the non-citizen box, she mailed in a second voter registration form indicating that she was a citizen. That application wound up in front of Delores Stevens, the same person who had processed Ortega’s original application and spoken with her on the phone. Stevens registered her to vote.

But then the state attorney general’s office under Paxton received allegations against Ortega and they investigated.

Chiraag Bains, a former prosecutor and civil rights attorney at the U.S. Justice Department, said that because criminal codes are so complicated, prosecutors have an incredible amount of flexibility in deciding whether and how to bring a case. Prosecutors normally consider the culpability of the individual, the severity of the offense and what kind of penalty is necessary to deter future misconduct.

“One thing that’s very clear is that the sentence here is far disproportionate to the conduct,” said Bains, now director of legal strategies at the think tank Demos, which has brought several voting rights cases across the country. “I think there’s a strong argument ... that there are alternative consequences that are more appropriate for conduct like this. Is this a case that somebody needs to go to jail for? No.”

Is this a case that somebody needs to go to jail for? No. Chiraag Bains, a former prosecutor and now director of legal strategies at Demos

Voter fraud is exceedingly rare in the United States, but Paxton has pursued it zealously in Texas, launching an entire unit within his office focused on the issue. In the same county where Ortega was prosecuted, an African-American woman was sentenced to five years in prison for illegally voting while she was still on supervised release for an unrelated felony conviction. Like Ortega, Crystal Mason said she didn’t know she was ineligible to vote. The prosecutions of two women of color drew accusations of racism when a white justice of the peace merely received probation after being convicted of turning in forged signatures on the petitions he needed to run for re-election this year.

Beth Stevens, the director of the Voting Rights Program at the Texas Civil Rights Project, said the decision to prosecute Ortega was politically motivated.

“They’re using this case to kind of prop up their claims of widespread illegal voting in the state so that then they can use that claim to make voting laws even harder and more strict,” Stevens told HuffPost. “Imagine if you’re a new citizen and gained the right to vote but are afraid that you’re going to get prosecuted. We see this obvious political gain because it helps the people in power.”

Aggressive pursuit of voter fraud charges isn’t confined to Texas. In North Carolina, a federal prosecutor is bringing charges against 20 immigrants for illegal voting. In at least some of those cases, it appears the people were mistaken or confused about their lack of voting rights.

In February 2017, Ortega was convicted on two counts of illegal voting, a second-degree felony punishable by between two and 20 years in prison. Prosecutors did not recommend a specific sentence for her, but left it up to the jury to decide. They also advised the jury that Ortega could be eligible for early parole.

But just before she was sentenced, a prosecutor suggested to jurors that Ortega was just the tip of the voter fraud iceberg.

“I just want to throw out one thought to you. You came back with the right verdict, [and] that if you hadn’t, if you’d come back with a not-guilty, can you imagine the floodgates that would be open to illegal voting in this county?” the prosecutor said.

In Ortega’s appeal, her lawyer highlighted that comment, saying it was inflammatory and outside the scope of the case. The appeals court rejected the argument on the grounds that Ortega’s trial attorney hadn’t objected to the remarks at the time in the right way.

Comments like that from a prosecutor are a “dog whistle,” Stevens said.

“The jury should be looking at her issue, not making an example of her to scare other people. Basically that’s what the attorney general’s office was asking the jury to do,” said Stevens. “They laid it all out in that closing statement, basically asking the jury to make something they can hang on the wall, [an] example of this woman, who is a real human being with children and family, on the consequences of this conviction.”

They’re using this case to kind of prop up their claims of widespread illegal voting in the state so that then they can use that claim to make voting laws even harder and more strict. Beth Stevens of the Texas Civil Rights Project

In a statement after the appeals court’s ruling, Paxton’s office distanced itself from the harsh sentence that Ortega had received, noting that the jury had chosen the length of her prison term.

Bains said it was “disingenuous” to suggest that the prosecutors in Ortega’s case had no control over the sentence. The remark about the voter fraud “floodgates” sent a clear message to jurors about the kind of sentence they should bring.

“That is sending the message to the jury that you need to punish ... severely because of the consequences that will follow if you don’t,” Bains said. “So it’s not surprising that the jury then came back with this disproportionate, heavy sentence of eight years.”

In a 2017 jailhouse interview with the Fort Worth Star Telegram, Ortega continued to insist that she hadn’t meant to break the law.

“I didn’t think I was doing anything wrong. People make mistakes. I had a lot of business and kids and stuff like that. People don’t look. Every time you get an application, you get mistakes.”