COLLEGE PARK, Md. (AP) — Maryland officials must draw up a new congressional redistricting plan that isn't tainted by partisan gerrymandering, a panel of federal judges ruled Wednesday.

The three-judge panel's decision, issued one day after the midterm elections, orders the state to submit the new map by March 7. Otherwise, the court will appoint a commission to produce a redistricting plan for use in the 2020 congressional election.

Several Republican voters sued over the boundaries of one of Maryland's eight congressional districts, claiming state officials unfairly redrew it in 2011 to favor Democrats.

The panel hearing the case in U.S. District Court in Maryland said the state must redraw the 6th congressional district's lines using "traditional criteria for redistricting," showing regard for "natural boundaries."

"Partisan gerrymandering is noxious, a cancer on our democracy," Chief District Judge James Bredar wrote in a concurring opinion.

The U.S. Supreme Court reviewed the case before deciding in June to refer it back to the lower court for a decision, effectively allowing the 2011 map to remain in place for Tuesday's congressional elections.

The Supreme Court could take up the issue of partisan gerrymandering again this term, in a case from North Carolina. Republicans in North Carolina have urged the justices to rule that courts should stay out of disputes about the political process.

Wednesday's decision, written by 4th U.S. Circuit Court Judge Paul Niemeyer, says the state's 2011 congressional map removed roughly 66,000 Republican voters from the 6th district and added around 24,000 Democratic voters, "bringing about the single greatest alteration of voter makeup in any district in the Nation following the 2010 census."

"To be sure, citizens have no constitutional right to be assigned to a district that is likely to elect a representative that shares their views. But they do have a right under the First Amendment not to have the value of their vote diminished because of the political views they have expressed through their party affiliation and voting history," Niemeyer wrote.

Critics have cited gerrymandering as the reason why Rep. John Delaney, a Democrat who is leaving the office to run for president, was able to defeat 10-term Republican Roscoe Bartlett in 2012, a year after the map was redrawn. Democrat David Trone won the seat on Tuesday, to maintain the 7-1 edge Democrats have in the state's congressional delegation.

Redistricting maps are drawn by the governor and approved by the state's General Assembly, which is currently controlled by Democrats.

Maryland Gov. Larry Hogan, a Republican, said the judges' decision confirms that Maryland has "the most gerrymandered districts in the country."

"This is a victory for the vast majority of Marylanders who want free and fair elections and the numerous advocates from across the political spectrum who have been fighting partisan gerrymandering in our state for decades," Hogan said in a statement.

A spokeswoman for Maryland Attorney General Brian Frosh's office, which has defended the state against the lawsuit, said in an email that the office is "reviewing options" after the judges' decision

Hogan has backed legislation designed to make congressional redistricting a nonpartisan process. Former Gov. Martin O'Malley, a Democrat, testified in a deposition for the federal lawsuit that he intended to "create a district where the people would be more likely to elect a Democrat than a Republican."

Kathay Feng, national redistricting director for the Common Cause advocacy group, said the court's ruling demonstrates Maryland's congressional map "squashed political participation and speech."

"Gerrymandering is an abuse of power no matter who does it, and both Democrats and Republicans use it for their political gain," she said in a statement.