In spring 2011, the six Democratic members of Maryland’s congressional delegations tasked Eric Hawkins with two key jobs: Draw new district lines that get us re-elected easily for another five terms, while also taking direct aim at the state’s last two Republicans.

Behind closed doors, Democratic insiders and high-ranking aides referred to it as “the 7-1 map.” Hawkins—an analyst at a Beltway data firm called NCEC Services—not only made it happen, but imagined an 8-0 map that might have shut Republicans out of power altogether. That, however, would have required spreading Democratic voters a little too thin and made some incumbents slightly less safe; these congressmen were partisans, sure, but they were also reluctant to risk their own seats.

New court depositions and previously unseen emails uncover just how determined Maryland Democrats were to take a seat from the Republicans and knock 10-term veteran Roscoe Bartlett—an idiosyncratic conservative who after losing his seat retired off the grid in the mountains of West Virginia, issuing dire warnings about the vulnerability of our power grid—out of office. They also reveal the partisanship with which Democrats approached redistricting in Maryland: As former governor and 2016 Democratic presidential primary candidate Martin O’Malley explains, he and other Democrats wanted to use their party’s control of the governor’s office to secure a  7-1 majority.

“Yes,” said O’Malley, in a deposition. “Part of my intent was to create a map that, all things being legal and equal, would, nonetheless, be more likely to elect more Democrats rather than less.”

Nationally, Republicans not only dominated the decennial redistricting that followed the 2010 census, but reinvented the partisan gerrymander. The GOP executed a strategy called REDMAP, short for Redistricting Majority Project. They successfully targeted control of state legislative chambers in Pennsylvania, Ohio, Michigan, North Carolina, Wisconsin and many other states, earning total control of the new lines even in bluish swing states. The GOP emerged from 2010 with unilateral power to draw 193 U.S. House seats while the Democrats fully controlled merely 44. REDMAP cost just $30 million and went a long way to ensuring GOP control of the House and state legislatures nationwide. In 2012 when Democratic congressional candidates received 1.4 million more votes but Republicans maintained a 33-seat majority. It was the biggest bargain—and perhaps the most audacious heist—in modern politics.

Nevertheless, the untold story of Maryland’s sixth congressional district—unfolding now in documents before a U.S. District Court in the Benisek v Lamone partisan gerrymandering case—illustrate just how fiercely Democrats, as well, have fought to rig the system in their direction when presented with the opportunity. Republicans controlled redistricting in many more states in 2010. But these court records show that Democrats were also eager to maximize a fundamentally broken redistricting process to their advantage, and to the detriment of democracy.

Both Democrats and Republicans used the same weapons. Armed with sophisticated mapmaking software, census data, and detailed partisan voting algorithms, NCEC’s Hawkins got busy tilting Maryland’s seats toward the Democrats. There were one-on-one meetings with nearly every Democrat in the delegation. Aides to powerful congressmen communicated with the firm from personal email accounts. Little was kept on paper: No agendas, no minutes, not an even a contract could be found between the Democrats and NCEC.

Maryland’s constitution requires the governor to take the lead on redistricting, conduct public hearings throughout the state, and then introduce maps before the general assembly. The Governor’s Redistricting Advisory Committee did meet, and in tightly scripted public events, barely budged from talking points. Depositions and the documents revealed during discovery showed the truth: It was all a charade. NCEC and the incumbent Democrats were doing the real work—and taking care of themselves—in rooms where no one else was watching.

Their goal, however, was clear: Flip Maryland’s sixth congressional district, a red seat for the previous two decades, into azure blue. The state’s delegation had always tilted Democratic, appropriately enough, since Maryland is a reliably blue state. But when O’Malley and the delegation embarked on the 2011 redistricting, a 6-2 edge and 75 percent of the congressional seats was not enough. They were determined to score seven of eight.

Hawkins, in his deposition, admits that he drew maps with the intention of “see(ing) if there was a way to get another Democratic district in the state.” It took somewhere before 10 and 20 different drafts, shared amongst leaders, before the final lines could be set.

O’Malley, in his deposition, does not hide that the “intent” was to draw a map that would “create a district where the people would be more likely to elect a Democrat than a Republican.” The Democrats had two GOP seats to target for extinction, but ultimately selected the sixth, because tilting the first district toward the Democrats would have necessitated ugly lines that jumped the Chesapeake Bay.

“Was a decision made? I suppose in the sense that we decided not to try to cross the Chesapeake Bay, that a decision was made to go for the sixth,” he mused. “I don’t know that there was any meeting. It’s a pretty big body of water … so we didn’t go in that direction.”

Just before Election Day in 2010, the sixth district included 208,024 registered Republicans and 159,715 Democrats. Break down the percentages and that’s 46.7 percent Republican and 35.8 percent Democratic. The new sixth was turned inside-out: Just before Election Day in 2012, it contained 145,620 Republicans and 192,820 Democrats. Almost 70,000 Republicans were exited from the district.

It’s rare for a 10-term incumbent to be knocked from office; even more rare for him to lose by upwards of 20 percent. But in 2012, Bartlett lost to Democrat John Delaney by some 75,000 votes.

The new sixth district, as drawn by Haskins, looks like a fire-breathing dragon. Its northern border is the one solid line, but as it turns southeast toward Washington, D.C., picking up liberal voters in suburban Montgomery County, it’s all juts and wild turns, taking the shape of a hideous beast directing hellfire upon the capital. It’s a frightful district, but the perfect metaphor for the damage it inflicts on representative democracy.

O’Malley and other Democrats defended the sixth district by arguing that it created representation for the growing “I-270 corridor” of commuters from Frederick into Washington. But that patchy argument disintegrated under oath. Hawkins, asked if he considered I-270 as a community of interest when drawing the lines, replied simply and honestly: No. The speaker of Maryland’s lower house and the chairwoman of the governor’s redistricting committee said the same.

According to court documents, Jason Gleason, a top staffer for Representative Sarbanes, wrote a colleague that  the I-270 explanation was “ painful to watch.” He continued: “I’m not sure I buy the themes they are selling. Hopefully they have some better ones for the public face of it.”

O’Malley didn’t have much better to offer in his deposition. He has become a reformer, of sorts, since leaving office, advocating for non-partisan redistricting commissions as well as ranked-choice voting. But in these court documents, he suggests that voters in Maryland understood redistricting to be a partisan exercise. As such, he argued, voters knew that electing a Democrat to serve a term that included the drawing of new legislative lines meant that they supported Democrats having a leg up in the process. He referred in his answers to voters he met on the campaign trail who encouraged him to lead a partisan redistricting effort.

It’s not a particularly convincing argument. Most voters pay little attention to redistricting, which is why politicians have been able to manipulate it so effectively for so many years. Indeed, if O’Malley believed that his election also brought a mandate for a shadow process designed to push Maryland’s congressional delegation from 75 percent blue to just under 88 percent,  why hide the process in the shadows? And if O’Malley and the Democrats genuinely felt that a census-year victory also delivers a mandate to tilt maps in the winner’s direction, they don’t have much of a case against  much more effective Republican gerrymanders in Pennsylvania, Michigan, Ohio, and North Carolina.  

Now the Maryland gerrymander only added one seat to the Democratic column. Republicans managed to turn so many blue seats red that after 2012 they took a 12-4 edge in Ohio, a 9-5 advantage in Michigan, a 13-5 bulge in Pennsylvania and a 9-4 margin in North Carolina. Over the course of three very different elections on these maps, only one district would change color in these swing states: a North Carolina seat that turned to the Republicans. A recent study by the Brennan Center for Justice at New York University’s School of Law suggested that some 70 percent of the GOP’s advantage in the House is based on gerrymandering in Texas and six swing states alone. Democrats grabbed an extra seat in Maryland, but it’s one seat in a blue state, unlike the GOP gerrymanders, which scored up to a half-dozen extra seats in some states where Democrats got more votes.

So why does the story of Maryland’s sixth matter so much? It’s a really simple reason: Neither party can be trusted to be honest brokers in drawing congressional districts. Both sides will maximize every advantage and claim it as a mandate, as their due. Right now, Democrats have mobilized under the leadership of former Attorney General Eric Holder to develop a BLUEMAP of their own. The answer, however, is not turning every zero-year election into a gerrymandering arms race to determine which side gets to turn district lines over to their well-paid GIS experts and data nerds.  

In the end, Americans are the real losers. Congressional elections become less competitive. Voters, outside maybe three-dozen swing seats, don’t really affect any outcomes. Congress becomes more polarized, more dysfunctional, and less effective. Members from safe seats have little incentive to compromise. American politics spirals deeper into toxicity with no bottom in sight. There are solutions, but they must be structural. One of the most comprehensive reforms will be introduced before Congress this month by Representative Don Beyer of Virginia. His Fair Representation Act combines ranked-choice voting with multi-member districts. It’s one approach among many to tackling the three-headed democracy-slaying hydra of gerrymandering, geographic clustering, and modern map-making technology.

O’Malley says that he understands all this now. He made redistricting reform part of his 2016 presidential campaign, and has joined the parade of politicians, who, once comfortably out of office, finally speak out about the rot within the system. The corruption of Maryland’s sixth congressional district might be a wake-up call others, as well. There are no redistricting angels. The structure changes—or nothing does.