(CNN) A federal court ordered Michigan to redraw its congressional and state legislative districts Thursday, raising the possibility that the state's Republican-drawn maps could be tossed ahead of the 2020 election.

But similar battles over legislative maps in Maryland and North Carolina are already before the Supreme Court, and appear likely to instead determine how the Michigan case will proceed.

A panel of federal judges on Thursday ruled that many of Michigan's districts -- including nine of its 14 congressional districts, two of which were previously held by Republicans but picked off by Democrats in last year's midterm elections -- were unconstitutionally gerrymandered to favor the GOP. The challenge was brought by the League of Women Voters of Michigan and several individual voters.

The court held the plans violated the plaintiffs' 14th Amendment equal protection rights and the First Amendment. The suit was brought against Jocelyn Benson, the Democratic Michigan secretary of state.

"Today, this Court joins the growing chorus of federal courts that have, in recent years, held that partisan gerrymandering is unconstitutional," the panel of three judges held. They added that federal courts "must not abdicate their responsibility to protect American voters from this unconstitutional and pernicious practice that undermines our democracy."

Read More