Correction below

We assume every American adult has a basic right: to vote. But state legislators in recent years have created barriers that limit that right. They have restricted the forms of ID voters must provide, eliminated same-day registration, and narrowed time periods for voting — mainly affecting people of color.

Now the tide is changing for voting rights, as judges in cases in North Carolina, Wisconsin, Texas, and North Dakota have ruled that the states’ restrictions discriminate on the basis of race. In Kansas, courts ruled that voters need not provide citizenship documentation.

Over the past five years, it became harder for Americans to vote. States passed at least several dozen laws that suppress voters’ rights — specifically affecting students, people of color, and poor people.

The changes go back to 2008, when President Obama rode to victory with the help of young, diverse voters — for the first time, a quarter of the eligible electorate was nonwhite, and the turnout among people of color was nearly on par with turnout among white voters. After the 2010 elections, states cited rare or nonexistent types of voter fraud to write new, restrictive voting rules and cut access for this newly active, increasingly diverse electorate.

Then in 2013, the Supreme Court gutted the Voting Rights Act, the crown jewel of all civil rights legislation. Saying that harsh structural racism was largely a thing of the past, Chief Justice John Roberts wrote that states with long histories of voting discrimination no longer needed to seek the approval of the federal Justice Department before changing their voting rules to guard against discrimination. In the following hours and days, more states, including North Carolina and Texas, passed sweeping restrictions on voting.

You’d have to go back to the Jim Crow era to find the last time states had this many restrictive laws on the books, one legal expert told the New York Times.

The court decisions in recent weeks, however, could make it easier for hundreds of thousands of voters to go to the polls in November.

Here’s what you need to know about recent court decisions:

North Carolina. The state passed the country’s most sweeping voting restrictions a month after the 2013 Supreme Court decision on the Voting Rights Act. On July 29, 2016, the Fourth Circuit Court of Appeals invalidated these restrictions, which it said “target African Americans with almost surgical precision.” The court found that legislators had surveyed data on voting patterns among African-Americans before creating rules to limit their ability to vote. Cutting early voting by seven days, for instance, would remove one Sunday when black churches bus voters to the precincts as part of their “souls to the polls” campaign.

Cutting early voting by seven days, for instance, would remove one Sunday when black churches bus voters to the precincts as part of their “souls to the polls” campaign.

Wisconsin. A federal district court on July 19 ruled that Wisconsin’s voter ID law violates the Constitution. The judge said voters who don’t have ID must be able to vote in November by signing an affidavit declaring they’re eligible.

Then, on July 29, another federal district court called the state’s voting system a “wretched failure” for Black and Latino voters. Judge James Peterson found that the state had eliminated early-voting hours on nights and weekends to “suppress the reliably Democratic vote of Milwaukee’s African Americans.” He added, “The Wisconsin experience demonstrates that a preoccupation with mostly phantom election fraud leads to real incidents of disenfranchisement, which undermine rather than enhance confidence in elections, particularly in minority communities.”

Kansas. Back in April, a federal district court ordered Kansas to register thousands of eligible voters who had been illegally asked for citizenship documentation, like a birth certificate or a passport, when they tried to register to vote at the state Department of Motor Vehicles. State officials said they would permit these voters to vote in federal elections but would not count their votes for state and local offices. Then, on July 29, a state court ordered an immediate halt to this dual voter registration system, so all registered Kansans can vote in all elections — federal, state, and local.

Texas. On July 20, the Fifth Circuit Court of Appeals, perhaps the most conservative federal appeals court in the country, ruled 9-6 that the state’s requirements for photo ID had a discriminatory effect on African-American and Latino voters. Voters had been required to show one of seven forms of photo ID before entering the voting booth. A gun license was acceptable, but an out of state drivers’ license was not, and nor was a college ID — even from the University of Texas, a state institution.

The state has now agreed to permit voters who lack ID to vote in November by signing an affidavit at the polls.

North Dakota. A federal judge on August 1 found the state had unfairly limited the right of Native Americans to vote by requiring photo ID and not allowing potential voters to swear an oath. Back in 2013, the state had repealed provisions of a law that allowed people without valid IDs to vote after swearing an oath that they were eligible.

While these are exciting developments, most of these cases are still on appeal. Moreover, about a dozen states still have new voting restrictions in place. And we cannot forget that this is the first presidential election without the protection of the Voting Rights Act.

The courts may have secured the right to vote for many heading into November, but powerful forces in state legislatures continue to lead the charge to limit the franchise — particularly for communities of color. And we’ll always stand in their way, no matter how disingenuous their attempts to restrict the vote.

Correction: A previous version of this post contained the sentence: The ACLU had filed a lawsuit against the new law on behalf of members of the Turtle Mountain Band of Chippewa. It was removed because it is inaccurate. The ACLU does not represent nor did we file the federal lawsuit on behalf of the Turtle Mountain Band of Chippewa. They are represented by the Native American Rights Fund.