A panel of federal judges in the US state of Texas have ruled that the state’s legislature had violated Section 2 of the Voting Rights Act by intentionally drawing congressional maps that unconstitutionally discriminated against Hispanic voters.

In their 2-1 ruling on Friday night, district court judges in the city of San Antonio further ordered the legislature to redraw congressional maps in three Texas districts that were racially gerrymandered by Republicans in efforts to undermined the growing electoral power of minorities.

The two judges who ruled in favor of the plaintiffs further found that Republican lawmakers repeatedly tried to dilute the political power of Latino voters by either packing them into one specific district, or dividing communities between separate districts -- a process referred to as "cracking."

"The Court finds that this evidence persuasively demonstrates that map drawers intentionally packed and cracked on the basis of race ... with the intent to dilute minority voting strength," US District Judges Xavier Rodriguez and Orlando Garcia wrote in their opinion.

“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,” they further observed in their ruling.

Texas Democrats, meanwhile, welcomed the ruling as a victory for voting rights. The state’s Republicans, however, did not immediately react to the ruling.

"The San Antonio Federal District Court ruled that Texas Republicans intentionally discriminated against Texas’ diverse new majority," said Texas Democratic Party Chairman Gilberto Hinojosa.

"Republicans have ensured that the dark days of discrimination in Texas continue to loom, but the sun will soon shine. In time, justice prevails," he added.

The Republican-controlled Texas legislature approved the maps in 2011, the same year then governor Rick Perry signed a voter ID law that ranks among the harshest in the US. Courts have since weakened that law as well.

The judges also 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.

Such tensions are erupting again over Donald Trump’s executive orders on immigration while Republican Texas governor Greg Abbott is also demanding strict crackdown on the so-called sanctuary cities.

The decision is the latest step in a years-long legal battle over efforts by the Texas legislature to grant Republicans the advantage in congressional races in the populous state — a battle that was initiated even before district lines were finalized after the 2010 Census.