Federal judges found more problems in Texas’ voting rights laws, ruling that Republicans racially gerrymandered some congressional districts to weaken the growing electoral power of minorities.

The ruling late Friday by a three-judge panel in San Antonio gave Democrats hope of new, more favorably drawn maps that could turn over more seats in Congress in 2018. But the judges in their 2-1 decision didn’t propose an immediate fix, and Texas could appeal to the US supreme court.

Republicans hold two of three congressional districts ruled newly invalid and were found to have been partly drawn with discriminatory intent. The GOP-controlled Texas legislature approved the maps in 2011, the same year then governor Rick Perry signed a voter ID law that ranks among the toughest in the US. Courts have since weakened that law, too.

Judges noted the “strong racial tension and heated debate about Latinos, Spanish-speaking people, undocumented immigrants and sanctuary cities” that served as the backdrop in the legislature to Texas adopting the maps and the voter ID law.

Those tensions are flaring again over Donald Trump’s executive orders on immigration, and Republican Texas governor Greg Abbott is also demanding tough crackdowns on so-called sanctuary cities.

“The record indicates not just a hostility toward Democrat districts, but a hostility to minority districts, and a willingness to use race for partisan advantage,” US district judges Xavier Rodriguez and Orlando Garcia wrote in their opinion.

Republican Texas attorney general Ken Paxton did not immediately remark on the ruling.

Hispanics were found to have fueled Texas’ dramatic growth in the 2010 census, the year before the maps were drawn, accounting for two out of every three new residents in the state. The findings of racially motivated mapmaking satisfied Democrats and minority rights groups, who are now pushing a separate federal court in Texas to determine that the voter ID law was also crafted with discriminatory intent.

Texas was forced ahead of the November election to weaken its voter ID law, which allows concealed handgun licenses but not college student IDs, after a federal appeals court found that the requirements particularly hampered minorities and the poor.

The Obama administration had brought the muscle of the US justice department into Texas to help challenge both the maps and voter ID law. But barely a month after Trump took office, the federal government reversed course and announced it would no longer argue that Texas purposefully discriminated against minorities with its voter ID law.

It was not yet clear whether the Trump administration will also drop opposition to Texas’ maps. But US circuit judge Jerry Smith, in a blistering dissent, criticized Obama administration attorneys after they joined the case.

“It was obvious, from the start, that the DoJ attorneys viewed state officials and the legislative majority and their staffs as a bunch of backwoods hayseed bigots who bemoan the abolition of the poll tax and pine for the days of literacy tests and lynchings,” Smith wrote. “And the DoJ lawyers saw themselves as an expeditionary landing party arriving here, just in time, to rescue the state from oppression, obviously presuming that plaintiffs’ counsel were not up to the task.”

The stakes in finding discriminatory intent are higher because it provides a window for opponents to argue that Texas should be forced to resume having changes to voting laws “pre-cleared” by the justice department or a federal court. A 2013 US supreme court ruling did away with pre-clearance by striking down a key provision in the federal Voting Rights Act.

The congressional districts voided by the panel belong to Democrat Lloyd Doggett and Republicans Will Hurd and Blake Farenthold. Hurd’s district, which runs from San Antonio to El Paso, has been a rare competitive swing district in Texas in recent years.