Federal judges have tossed out one of Maryland’s congressional districts over gerrymandering concerns, guaranteeing the map will change for the next election.

The three-judge panel ruled unanimously in favor of the Republican plaintiffs on Wednesday, and set a four-month deadline for the district — Maryland’s 6th — to be redrawn, saying it unconstitutionally disenfranchised GOP voters.

The case was brought to court by seven Republican voters, who said the 2011 redistricting of the 6th district removed about 66,000 Republican voters and replaced them with about 24,000 Democratic voters.

The plaintiffs said the goal in redrawing the district was to have seven Democrats and one Republican in the House of Representatives, rather than the previous six Democrats and two Republicans, according to case documents.

Republicans said that the lines were in violation of their First Amendment rights because the state “deliberately diluted their votes,” according to the ruling.

[Read more: At UMD’s Stamp Student Union, voters broke overwhelmingly for Ben Jealous]

Redrawing the 6th district could affect the ones around it, too. And if the state doesn’t meet the March deadline, the judges will appoint a commission to do it instead.

Prior to the 2011 redrawing, Republican Roscoe Bartlett had won 10 straight elections in the 6th district, including nine straight double-digit victories. For the 2010 general election, the district’s registered voters were 46.7 percent Republican and 35.8 Democrats.

The ruling notes several comments from Democrats who hoped to flip the district, including then-Gov. Martin O’Malley, who said the goal was to “create a district where the people would be more likely to elect a Democrat than a Republican.” The redrawn 6th district contains more area in Montgomery County and no area from Carroll, Baltimore or Harford Counties.

In 2012 — the first general election with the redrawn 6th district — 46.7 percent of the district’s voters were registered as Democrats, while 36.0 percent were registered as Republicans. With the new makeup of the 6th district, Bartlett fell short in his bid for an 11th term, and the district has remained Democratic ever since.

“Democratic officials, with the help of NCEC, worked to craft a map that would specifically transform the Sixth District into one that would predictably elect a Democrat by removing Republicans from the District and adding Democrats in their place,” the judges wrote in their ruling.

[Read more: At UMD’s Stamp Student Union, voters broke overwhelmingly for Ben Jealous]

The decision came on the heels of Gov. Larry Hogan’s victory Tuesday night, making him the first Republican to nab a second term in the state in more than 60 years. But the GOP’s General Assembly candidates didn’t fare nearly as well, as Democrats hung onto the state Senate and House of Delegates.

Meanwhile, Democrats will continue to hold seven of Maryland’s eight seats in the U.S. House of Representatives. The six Democratic incumbents running for re-election won, and David Trone triumphed in the election to replace outgoing Rep. John Delaney as the 6th district representative.

Hogan has been pushing for a independent commission to draw the state’s congressional lines for years.

In a statement released Wednesday, he said the ruling confirms that Maryland has “the most gerrymandered districts in the country, they were drawn this way for partisan reasons, and they violate Marylanders’ constitutional rights.”

The ruling quotes now-retired Supreme Court Justice Anthony Kennedy, who wrote in 2004 that “First Amendment concerns arise where a State enacts a law that has the purpose and effect of subjecting a group of voters or their party to disfavored treatment by reason of their views.”

Stella Rouse, the director of the University of Maryland’s Center for American Politics and Citizenship, said Hogan is likely in favor of an independent commission because it takes power out of the hands of Democrats.

“Democrats have controlled that process for years, because Democrats are the dominant party in the state,” she said. “So Democrats are the ones that have … drawn the lines in their favor.”

In 2017, the majority Democratic Maryland General Assembly passed a bill that would have put in place a state compact with New York, New Jersey, Pennsylvania, Maryland, Virginia and North Carolina, where an independent panel would be in charge of drawing district lines as long as the legislation passed in all six states.

Hogan vetoed the bill in May of that year. In a Facebook post at the time, he said the bill was a “political ploy designed with one purpose: To ensure that real redistricting reform would never actually happen in Maryland.”

David Polefrone, campus liaison for this university’s College Democrats chapter, said he doesn’t oppose an independent commission and doesn’t agree with the way the districts are currently drawn, but he questions Hogan’s motives.

“It’s kind of strange for Larry Hogan specifically to support these sorts of commissions when he’s repeatedly vetoed [a] state compact involving, you know, the creation of these sorts of commissions outside of just Maryland,” the sophomore biochemistry and economics major said.

Hunter Petit, a member of this university’s College Republicans, said he doesn’t agree with the current method of politicians drawing congressional lines.

“I think that gerrymandering is the most common form of voter suppression,” said Petit, a freshman information systems and government and politics major. “You’re essentially rigging an election in order to win.”

Still, Petit said that concerns that Hogan will gerrymander Maryland in favor of Republicans are unfounded.

“I just can’t see him doing that at all, after — for four years — him actually trying for a nonpartisan, independent way to do this,” Petit said. “If he were to be drawing the lines, he would draw them in a fair way for everyone.”