After two weeks of vote-counting, the measure passed by a tiny margin in one of the country’s reddest states.

Utah is one of the reddest states in the country, but not too red to embrace the kind of redistricting reform pushed by progressive voting-rights advocates around the country. After two weeks of nail-biting vote-counting, Utah joined three other states in curbing gerrymandering by approving independent redistricting commissions through ballot initiatives in the November 6 midterm elections.

As the final ballots were tallied this week, the measure eked out a victory by less than 1 percent of the vote. As a result, Utah becomes the latest state to hand over drawing of its political maps to an independent commission in response to heavily gerrymandered districts warping the democratic process across the country. On Election Day, voters in Michigan, Colorado, and Missouri also approved ballot measures to end gerrymandering. Utah voters also approved propositions to expand Medicaid under the Affordable Care Act and legalize medical marijuana.

Still, Utah wasn’t obvious terrain for a progressive voting reform. In 2016, its incumbent Republican senator, Mike Lee, won reelection in 2016 with more than 68 percent of the vote, and Republicans won all four of the state’s congressional seats. That was no accident. Since 2001, Republicans in the legislature had attempted to gerrymander the state’s lone Democrat, Jim Matheson, out of Congress. As Mother Jones’ Stephanie Mencimer reported:

When Matheson was first elected in 2000, his district consisted entirely of Salt Lake County, an area that’s home to the highest percentage of registered Democrats in the state. A year later, the GOP-dominated state Legislature redrew the boundaries of the 2nd District to dilute the power of Democratic voters, excising chunks of Salt Lake County while adding large rural stretches of the state. Parts of Matheson’s new district were a five-hour drive from his home in Salt Lake. The Cook Report assessed the new 2nd District as one that a generic Republican ought to win by at least 15 points.

But Matheson, a conservative Democrat, improbably hung on. So in 2011, Republicans took another shot at him:

Unable to beat Matheson at the ballot box, Utah’s Legislature took another crack at rejiggering his district in 2011, this time changing the boundaries to cover even less of Salt Lake County and to exclude Moab, a liberal outpost in far southern Utah, where 50 percent of the voters are Democrats.

Matheson had to switch districts to hang on another two years, before retiring in 2014. But this year, energized Democratic voters not only approved redistricting reform, they also ousted the Republican incumbent, Mia Love, from Matheson’s old seat. On Tuesday, Democrat Ben McAdams won it by defeating Love by just 694 votes.

With an independent redistricting commission for the 2021 map-drawing process, Utah Democrats would likely benefit, since the current maps are drawn to disadvantage the approximately one-third of Utah voters who are not reliably Republican. The commission would also draw maps for the state legislature, where Democrats hold just 12 of 75 state House seats and five of 29 state Senate seats.

But even with a redistricting commission, Utah’s Republican majority is unlikely to lose too much clout, since the initiative doesn’t take politics out of redistricting to the same extent as similar measures in other states. The commission’s seven members will be chosen by the governor and leaders in the state legislature, giving incumbent Republicans more appointees in 2021 than Democrats. Moreover, a recommended map need not be approved by the entire commission, and the legislature is not bound to accept the map the commission chooses. The legislature can draw its own map instead, as long as it releases a written explanation for why it chose to reject the commission’s recommended map.