Are free and fair elections too much to ask for? Thanks to partisan gerrymandering — and its ugly cousin, prison gerrymandering — the answer is often yes.

High-stakes redistricting battles now underway will help determine next year’s midterm elections. In a perfect world, parties would work together to ensure fair representation for their various constituencies. In the real world, the party in power usually redraws district maps to favor itself.

This dirty little trick is called partisan gerrymandering. Both parties do it, but Republicans are taking it to extremes that their own voters don’t even support. A majority of Republican voters, like Democrats and independents, favor independent redistricting commissions.

Instead, they’re getting absurdly lopsided maps in states like North Carolina and Ohio, where Republican-controlled state legislatures drew maps so partisan that there’s a good chance they’ll end up in court.

In Ohio, just over 50 percent of voters went with Trump in 2020. Yet Republicans drew a map where 12 of 15 congressional seats — 80 percent — are theirs to lose. In North Carolina, where under 50 percent went for Trump, Republicans awarded themselves over 70 percent of the seats.

Gerrymandering affects every voter in this country in one way or another, but it is especially sinister where it overlaps with our massive prison system. At any given time, there are around 2 million Americans behind bars. And where they’re held is a key piece of the gerrymandering puzzle.

Most states count their prison populations as residents of the facility where they’re held rather than their home address. That practice turns out to be deeply undemocratic.

The majority of prisons are located in rural areas, where they house incarcerated people who are often transferred from more urban areas. When districts are drawn, that means more representation for those rural areas — and less for the urban ones.

This process, called prison gerrymandering, is problematic for a number of reasons.

First, it’s unfair. It amounts to stealing political power from diverse urban communities and transferring it to majority-white rural communities.

Second, prison gerrymandering can result in districts that, outside the prison population, fail to meet the minimum number of residents required to satisfy the Constitution’s threshold for congressional seats.

This happened in California’s 20th congressional district before the state ended prison gerrymandering in 2011, for example. And it’s even more of an issue for state legislative districts today.

For example, House District 8 in Texas would lose 12.59 percent of its population if incarcerated people weren’t counted. According to the Texas Civil Rights Project, that’s well beyond the threshold traditionally viewed as legally allowable for state legislative districts.

OklahomaFlorida, and Idaho, among other states, also have state legislative districts that are only viable because of sizable prison populations.

Finally, it reeks of the notorious “three-fifths compromise” that once counted enslaved people toward the political representation of slaveholding states — despite the fact that those enslaved people couldn’t vote. Disenfranchised incarcerated people are used the same way today.

If that doesn’t fly in the face of the famed “one person, one vote” principle and the Equal Protection Clause of the 14th Amendment, I don’t know what does.

The Supreme Court has resisted attempts to fix partisan gerrymandering, let alone prison gerrymandering, and Republicans have uniformly filibustered attempts to address the problem in Congress. After all, those with power rarely give it up willingly.

Thankfully, federal action isn’t the only solution. Seven states have officially ended the practice of prison gerrymandering for congressional and state legislative districts. Another four have ended it for state legislative districts only.

Extreme partisan gerrymandering is showing voters across the country how distorted our electoral system is. In the process, voters are learning about the racist practices, like prison gerrymandering, that underpin that system.

That, at least, is a good thing.

Robert P. Alvarez is a media relations associate at the Institute for Policy Studies. This op-ed was distributed by OtherWords.org.