A panel of federal judges in San Antonio ruled Friday that some of Texas’ congressional districts are unconstitutional or violate the Voting Rights Act.

A 2-1 majority in the U.S. District Court for the Western District of Texas decided that the Texas legislature must redraw Texas’ 23rd, 27th and 35th Congressional Districts. The 23rd and 27th districts are represented by Republicans, while the 35th is represented by a Democrat.

“This Court finds that map-drawers acted with an impermissible intent to dilute minority voting strength or otherwise violated the Fourteenth Amendment,” judges Xavier Rodriguez and Orlando Garcia wrote in their opinion.

Democratic National Committee chair Tom Perez praised the decision in a statement.

“The federal court further confirmed what we’ve known all along: Texas intentionally discriminated to disenfranchise Latino and African-American voters,” said Perez, who previously challenged states’ voting laws as head of the Department of Justice’s civil rights division. “We need a robust program at the DNC that protects all voters and fights back against attempts to limit access to the ballot box.”

Texas can still challenge the decision at the Supreme Court, but the ruling gives Democrats hope that they can compete on a more favorable map in 2018.

Democrats have also had some success recently challenging Republican gerrymandering of legislative districts. That has consequences not just for state lawmaking, but the next round of congressional redistricting after 2020.

Earlier this month, the Supreme Court ordered a lower court to reconsider whether the gerrymandering of the state’s legislative districts discriminated against African-Americans by attempting to dilute their political influence.

In January, a federal court ordered the Wisconsin legislatures to redraw their legislative districts so they do not favor Republicans as much.

And a federal court ruled in January that 12 of Alabama’s legislative districts were unconstitutional due to their racial makeup as well.