A panel of federal judges on Wednesday said that Texas lawmakers do not need federal oversight during the state’s next redistricting cycle, putting an end to a years-long legal battle over voting rights and the state’s political maps.

The San Antonio-based panel denied a request from a group of minority voters and voting rights organizations to place Texas back under federal supervision in 2021.

Lawyers for these groups argued that without this requirement, state lawmakers would be able to continue a pattern of drawing political districts with the intention of discriminating against minority voters.

In Wednesday’s order, Judge Xavier Rodriguez wrote that judges still have “serious concerns” about the state’s past actions, noting that lawmakers displayed “intentional racial discrimination in violation of the Fourteenth Amendment” while drawing district maps in 2011.

But the panel ultimately sided with lawyers for the state and said requiring federal oversight during the next redistricting cycle “would be inappropriate,” given a recent Supreme Court ruling that found lawmakers did not display an intent to discriminate when they adopted the state’s current districts in 2013.

Texas Attorney General Ken Paxton called the decision a “win for our Constitution and the right of Texans to govern themselves.”

“We are thankful that today’s decision finally puts an end to this baseless challenge,” Paxton said in a statement.

For years, Texas was required to seek federal approval before making changes to political maps. When boundaries state lawmakers drew in 2011 were rejected for being discriminatory, the state was ordered to implement interim maps during the 2012 election that were drawn by federal judges.

In 2013, state lawmakers voted to adopt modified versions of the interim maps as the state’s permanent districts. The boundaries were challenged in court, but ultimately upheld by the U.S. Supreme Court.

Even though the 2011 maps were not utilized, the judges in Wednesday’s order said claims that the maps intentionally diluted minority voting power were still valid.

“Though the Supreme Court may have found no discriminatory purpose in 2013, it did not undermine the findings of purposeful discrimination in 2011,” Rodriguez wrote.

Given this context, the panel issued a stern warning to state lawmakers, instructing them to ensure future redistricting efforts are constitutional and conducted in compliance with the Voting Rights Act — or they could face future legal intervention.

Rodriguez noted “minority population levels are markedly increasing,” which could create the perception for growing voting power for “emerging demographic groups.”

“Given the fact of changing population demographics, the likelihood increases that the Texas Legislature will continue to find ways to attempt to engage in ‘ingenious defiance of the Constitution’ that necessitated (federal supervision for the state) in the first place,” the order reads.

Gilberto Hinojosa, chairman of the Texas Democratic Party, called past actions by state lawmakers “disgusting” and said in a statement that he was disappointed in the panel’s decision to allow Texas to move forward without federal oversight.

“We believe that democracy is stronger when everyone participates, that’s why we fight to make it easier for Texans to vote,” Hinojosa said, noting that this decision highlights the importance of the coming election. “This election, our democracy is at stake and we will fight like our lives depend on it, because they do.”