In this Nov. 6, 2018, photo, voters wait in line on Election Day in Southfield, Mich. (Clarence Tabb, Jr /Detroit News via AP, File)

DETROIT (CN) – After several weeks of deliberation, a trio of federal judges ruled Thursday that Michigan Republicans illegally drew election maps to secure GOP victories and ordered lawmakers to redraw dozens of districts for the 2020 election.

The lawsuit, originally filed in 2017 by Democratic constituents and the League of Women Voters, sought to prove, using unearthed insider emails and research about each district, that Michigan Republican leaders acted with a conscious intent to gerrymander the state’s legislative and congressional district maps.

A three-judge panel overseeing the trial, which began in February, was convinced and found in a 146-page opinion released Thursday that 2011 redistricting maps drawn on behalf of the Michigan GOP favored Republicans and discouraged opponents from running for office.

“Today, this court joins the growing chorus of federal courts that have, in recent years, held that partisan gerrymandering is unconstitutional,” the ruling states. “We find that the enacted plan violates plaintiffs’ First and Fourteenth Amendment rights because it deliberately dilutes the power of their votes by placing them in districts that were intentionally drawn to ensure a particular partisan outcome in each district.”

The panel is made up of U.S. Circuit Judge Eric Clay of the Sixth Circuit and U.S. District Judges Denise Page Hood and Gordon Quist. Election district challenges go before a three-judge panel by default, and appeal petitions go directly to the U.S. Supreme Court.

According to the ruling, Republican leaders knew exactly what they were doing.

“The map-makers were intimately aware of the political consequences of their map-drawing efforts. For instance, [they] drew the House maps in a secure location to which nobody else had access because according to McMaster ‘everyone was honing us. Every staffer’s political future, every representative’s political future, depended on how the lines turned out,’” Judge Clay wrote for the panel.

Clay wrote that the map-makers “also shared draft maps with each other and strategized about how to best draw maps that advantaged Republicans.”

“Accordingly, the court will provide the Michigan Legislature the opportunity to devise remedial maps that are consistent with this opinion, that remedy the constitutional violations discussed above, and that otherwise comply with the United States Constitution,” the ruling states. “We will only consider any remedial plan passed by both chambers of the Michigan Legislature and signed into law by the governor of Michigan on or before August 1, 2019. The court will not entertain any redistricting plans after that date.”

Brandon Dillon, former chair of the Michigan Democratic Party, testified in the trial about the state of the district maps and agreed under questioning they were “packed and cracked.”

Dillon, who wore horn-rimmed glasses, patiently answered numerous questions about the maps and explained that it was very difficult to recruit a Democratic candidate for certain districts because they knew it was a no-win situation.

He said the maps were discouraging to voters who knew “no matter how hard they worked, [their] efforts were futile.”

Dillon recounted one recruiting incident where Democratic donors refused to contribute even after the Republican candidate in the Michigan House of Representatives’ 24th District made offensive comments that were caught on tape.

Lawyer Kevin Fanning, representing intervening Republican senators, grew boisterous at times when he questioned Dillon in February. Fanning said the 8th Congressional District was won by Democrat Elissa Slotkin in last November’s election and asked whether Dillon considered that a “cracked” district.

“Yes,” Dillon replied.

Fanning also asked Dillon what would stop Democrats from winning in any other district considering Slotkin was able to pull off the upset.

“Trump had a lot to do with that,” Dillon replied.

An email seeking comment from Goodman Acker attorney Mark Brewer, a member of the Michigan Democratic Committee, was not immediately returned Thursday.

Emails to attorneys Gary Gordon from Dykema Gossett and Jason Torchinsky from Holtzman Vogel, representing the Michigan secretary of state’s office, were also not returned.