In 2012, she registered to vote, and not only cast ballots in the next two elections but served as a poll worker. Divorced, she raised four children, now teenagers, sometimes working three jobs.

“When my mom was here, she did everything illegal,” Ms. Ortega, 37, said in an interview. “I wasn’t going to let that happen to me.”

She may not have a choice. Ms. Ortega, of Grand Prairie, Tex., a suburb between Dallas and Fort Worth, is a permanent resident with a green card, but she is not an American citizen. In a case that made national headlines last month, she was found guilty, fined $5,000 and sentenced to eight years in prison because the ballots she cast in 2012 and 2014 were illegal. While green-card holders have many of the rights of citizens, they cannot vote.

If the verdict is upheld, she will serve her sentence and, in all likelihood, be deported to Mexico. For green-card holders, a criminal conviction is effectively a ticket for deportation.