A federal court struck down Texas’ voter ID law on Thursday, comparing it to historical attempts by some southern states to prevent African-Americans from voting in the post-Civil War era.

Separately, the Supreme Court granted a stay in a case challenging Wisconsin’s voter ID law, blocking it from taking effect for the November election.

The decisions come amid a flurry of court challenges to laws states have implemented in the past year that impact how voters are able to cast their ballots in the November election. The midterms will determine which party controls the Senate for the next two years, and several races are incredibly close.

The Supreme Court ruled last month that Ohio can cut its early voting days, and earlier this week, it allowed North Carolina to eliminate same-day registration and ban voters from casting ballots outside of their own precinct.

At FRONTLINE, we’ve been tracking changes to state voting laws nationwide over the last five years. Some of the most significant changes — and court challenges — have come just since 2013.

Texas’ voter ID law, which took effect last year, was considered among the most strict. It required voters to present one of a handful of photo IDs. Those who couldn’t present proper ID risked being turned away at the polls. Obtaining an ID presented an obstacle for some low-income voters who couldn’t afford to pay for the underlying identity documents, such as a birth certificate, which costs $25.

Officials said the law was intended to prevent election fraud, but in-person voter fraud, which the ID requirement would thwart, is rare. A major in the Texas attorney general’s law enforcement division, Forrest Mitchell, told the court that only two people were convicted of impersonating another voter in the 10 years before the ID law was passed in 2012; 20 million were votes cast during that time. In one case, a man attempted to vote as his brother, who was incarcerated. He was caught at the polls. In another, a man voted as his deceased father.

At the same time, by Texas’ own estimate, roughly 800,000, or 6 percent of registered voters lacked a driver’s license or personal ID card, meaning they might not be able to vote under the law. Of those, the state said nearly 11 percent were Latino. It didn’t break out numbers on African-American voters.

Although the law was passed in 2012, it was blocked under a provision of the Voting Rights Act for imposing ‘strict, unforgiving burdens on the poor.’ The court noted that ‘racial minorities in Texas are disproportional likely to live in poverty.’

The law was in effect for the first time last year, during which several people were turned away from the polls. They included Floyd Carrier, an 83-year-old African-American veteran who testified against the law in court. Carrier had three forms of ID when he went to the polls last November, but he still wasn’t allowed to vote.

Neither his expired driver’s license or federal veteran’s card, nor his voter registration card qualified under the state’s new voter ID law. And Carrier was born in a rural area and didn’t have a birth certificate to obtain a new state-issued voter ID. In this small town of 1,160, the poll workers knew Carrier, but had to deny him a ballot. Carrier’s son, Calvin, testified that he has tried to obtain a birth certificate for his father, picking up the cost, but the old records have clerical errors that render the document unusable.

In her ruling, which referenced Texas’ entrenched history of discrimination, Judge Nelva Gonzales Ramos of the U.S. Court of the Southern District of Texas found that the law

has an impermissible discriminatory effect against Hispanics and African-Americans, and was imposed with an unconstitutional discriminatory purpose.’ She also wrote that the law constitutes a ‘poll tax,’ a measure implemented in southern states after the Civil War that required voters to pay a fee in order to cast a ballot. Since most African-Americans couldn’t afford the fee, they weren’t allowed to vote.

The Texas attorney general’s office said it would ‘immediately appeal’ the ruling.

Wisconsin’s voter ID law had previously been blocked, but allowed to move forward by a federal appeals court in September. Civil-rights groups challenging the law estimated that roughly 300,000 voters — most of them low-income minorities — did not have an acceptable form of identification. The September ruling also caused confusion because voters had already begun to mail in ballots. Officials announced that those ballots would be thrown out unless voters came back to present some form of ID. The Supreme Court’s ruling means the law cannot take effect for this election.