Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A federal court nullified two of Texas’ 36 congressional districts Tuesday, unanimously ruling that they were drawn with the intent to weaken minority voting power in violation of the federal Voting Rights Act and the U.S. Constitution.

Hispanic voters in one county in the state's 27th Congressional District, which includes Corpus Christi, “were intentionally deprived of their opportunity to elect a candidate of their choice,” the three-judge panel of the U.S. District Court for the Western District of Texas wrote in a 107-page ruling.

The court also called the 35th Congressional District, which includes parts of San Antonio and Austin, an “impermissible racial gerrymander.”

However, the court sided with the state with regard to other districts, ruling there was no evidence of “intentional discrimination/dilution” in the Dallas-Fort Worth area, Houston or the 23rd Congressional District.

Texas Attorney General Ken Paxton, left, with his chief of staff Bernie McNamee, right, waits to testify during a Texas Senate Health and Human Services Committee hearing on Planned Parenthood videos covertly recorded that target the abortion provider, on July 29, in Austin, Texas. Eric Gay / AP

Texas Attorney General Ken Paxton called the ruling “puzzling” because “the legislature adopted the congressional map the same court itself adopted in 2012, and the Obama-era Department of Justice did not bring any claims against the map.”

“We appreciate that the panel ruled in favor of Texas on many issues in the case,” Paxton said in a statement Tuesday. “We look forward to asking the Supreme Court to decide whether Texas had discriminatory intent when relying on the district court.”

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The suit was brought in 2011 by several Texas voters, Democratic and minority lawmakers along with several advocacy groups, including the NAACP, the Mexican American Legislative Caucus and the League of United Latin American Citizens.

Related: Supreme Court to Consider Case on Partisan Gerrymandering

The plaintiffs claimed the Texas state legislature created a gerrymandered map in 2011, which diluted minority representation following the 2010 U.S. Census.

The court ruled in favor of the plaintiffs and the legislature scrapped its re-drawing plans. The court, at that time, then scrambled to create interim maps ahead of the 2012 elections amid the legal battle over redistricting.

The state legislature then formally adopted the court-drawn map in 2013, which has been used in the past three election cycles.

But, the court argued, the maps were “enacted without a full review of the facts or the law” and carry over “the racially discriminatory intent and effects” of the 2011 legislative map plan.

“The discriminatory taint was not removed by the legislature’s enactment of the court’s interim plans, because the legislature engaged in no deliberative process to remove any such taint,” the judges said in the ruling. “Defendants knew that most plaintiffs would maintain claims against the interim plans if adopted, despite the changes, and that such challenges might indicate that further changes to the maps were required.”

“The court clearly warned that its preliminary conclusions…were not based on a full examination of the record or the governing law and were subject to revision,” the judges added.

Democratic Party Chairman Gilberto Hinojosa looks out from the stage after speaking at the Texas Democratic Convention in Dallas on June 27, 2014. LM Otero / AP file

Texas Democratic Party Chair Gilberto Hinojosa celebrated the ruling in a statement Tuesday, saying that before the decision, state Republicans “politically profited from discrimination.”

“Republicans initiated a deceitful legal strategy to deliberately silence Texans from having a voice in their own government,” he said.

Paxton, the attorney general, has three business days from Tuesday to file an advisory stating whether the state legislature will redraw the maps.

If the state legislature does address the court's issues, there will be a hearing September 5 and both parties will have to consult with experts and map-drawers to fix the "violations" found in the two districts, the judges said, but must also “minimize the effect on adjoining districts.”