Democrats in Annapolis and Republicans in Richmond have at least one thing in common with disgraced cyclist Lance Armstrong: using PEDs to rig races. Armstrong used performance-enhancing drugs to cheat his way to seven consecutive Tour de France wins. The two largest political parties have used gerrymandering to create performance-enhancing districts that rig elections for their congressional and legislative nominees.

Maryland’s 3rd Congressional District staggers like a drunken sailor from Annapolis to Towson to Olney, dividing neighborhood after neighborhood. The 6th District, drawn by Democrats to defeat U.S. Rep. Roscoe Bartlett (R) , and the 8th District slice communities across Montgomery and Frederick counties. Used as pawns, more than 60 percent of Montgomery’s residents were moved to a different congressional district in 2011.

Appalled by his party’s gerrymander, Bethesda resident and American University law school student Steve Shapiro sued Maryland. In 2015, after years of hard work, he and his attorney, Michael Kimberly, persuaded the Supreme Court to unanimously order that a three-judge panel review whether Maryland’s gerrymander, which looks like blood spatter from a crime scene, violates the First Amendment by intentionally depriving a group of voters — in this case, Republicans in Maryland’s 6th District — of a voice in the House of Representatives because of their party affiliation. In August, the panel ruled that the case has merit and can proceed. The results could sink gerrymandering throughout the country.

In Virginia, Republicans drew performance-enhancing congressional districts that rig most elections for their nominees by packing registered Democrats into as few districts as possible. Republicans hold eight of Virginia’s 11 House seats, even though Democrats consistently win statewide elections. After Democrats sued, a three-judge panel redrew the redistricting map this year to give African American voters a better chance to have a potentially decisive impact in two congressional districts rather than just one. Democrats won both districts on Nov. 8.

In no small part because of gerrymandering, low-turnout primaries rather than higher-turnout general elections are the key contests in an overwhelming majority of congressional and legislative elections. Gerrymandering cheats the public of legislators who must appeal to an ideologically broad group of people to get elected and creates incentives for officials to legislate as if only primary voters matter, especially in states with closed primaries where unaffiliated voters — more than 140,000 in Montgomery County alone! — are prohibited from voting in all but the nonpartisan races. Gerrymandering exacerbates political polarization, contributes to gridlock in Congress and undermines competition in legislative seats as well. In the 2014 general election for Virginia state House and state Senate, most incumbents faced no major-party opponent.

But gerrymandering isn’t inevitable; California has eliminated it. In 2008 and 2010, California voters used their initiative power to petition to the ballot and approve an independent redistricting commission that excludes elected officials from any decision-making role in redrawing congressional and legislative boundaries. California’s districts are now compact and aren’t drawn to rig elections for one party or for incumbents.

Maryland Gov. Larry Hogan (R), the first governor in the state elected using public financing, fulfilled his 2014 campaign pledge to tackle gerrymandering by proposing an independent redistricting commission. Democrats in Annapolis promptly deep-sixed the bill. Since a September 2015 Goucher Poll of Marylanders found that 73 percent support an independent redistricting commission, Hogan’s approval ratings will likely increase as his championship of political reform becomes better known.

In 2011, few Democratic legislators in Annapolis broke party ranks and voted against the nation’s worst congressional gerrymander; no Republican state senators in Richmond opposed the gerrymander there. Unlike in California, voters in Maryland and Virginia can’t initiate a ballot measure to establish a new law. Given that reality — and the difficulty of persuading legislators who benefit from gerrymandering to remove themselves from the process — court-imposed congressional redistricting standards, which Shapiro’s case may bring about, are needed to prevent legislators in Maryland, Virginia and other states from creating “gerry-rigged” districts again after the 2020 Census.

Eventually, Lance Armstrong was held accountable for using performance-enhancing drugs to rig races. Voters should hold state officials accountable who undermine democracy by approving performance-enhancing districts to rig elections.

The writer, a Democrat, served on the Montgomery County Council from 1998 to 2014 and is a former executive director of Common Cause Maryland.