The difference between Democratic versus Republican control of the US Senate could come down to a few thousand votes in North Dakota. And the Supreme Court just put its thumb on Mitch McConnell’s side of the scale.

The high court ruled late last week in favor of a widely criticized North Dakota voter-identification law that requires eligible voters to present an ID that includes a residential address in order to cast a ballot. Because Native Americans in the state often have IDs that list post-office boxes—rather than street addresses—Jacqueline De León, an attorney with the Native American Rights Fund, warns that “North Dakota Native American voters will now have to vote under a system that unfairly burdens them more than other voters.”

Standing Rock Sioux tribal chairman Mike Faith is blunter in his assessment: “Native Americans can live on the reservation without an address. They’re living in accordance with the law and treaties, but now all of a sudden they can’t vote. This law clearly discriminates against Native Americans in North Dakota.”

That discrimination is a big deal for Native Americans, whose voting rights have too frequently been undermined and assaulted.

It is, as well, a big deal for the politics of North Dakota and the nation.

North Dakota is a state where Native Americans make up 5.5 percent of the population, where Native Americans have tended to a history of giving overwhelming support to Democrats (over 80 percent in key counties in key elections) and where Democratic US Senator Heidi Heitkamp is now running a hard race to retain a seat to which she was elected in 2012 by fewer than 3,000 votes (50.2 percent for the Democrat to 49.3 percent for her Republican rival). Those numbers point to the very real prospect that the discrimination the high court has permitted could disrupt grassroots democracy on November 6. And it won’t stop there.

In this contentious year, disruption in one state has the potential to disrupt the battle for control of Congress.

Heitkamp is generally seen as the most endangered Democratic incumbent of 2018, especially since she opposed the nomination of Donald Trump’s nominee for the Supreme Court, Brett Kavanaugh, in a state that in 2016 backed Trump with a 63-27 landslide. But the Democrat, an able campaigner with deep roots in North Dakota, is still holding her own. She trails Republican Kevin Cramer, but her numbers are far better than those posted by Hillary Clinton in the state two years ago—and Heitkamp has a history of outperforming her poll numbers, finishing strong and winning narrowly on Election Day. (A number of polls and predictions pegged the senator as a likely loser going into the 2012 election that she won by 0.9 percent of the vote.)

Republicans at the state and national levels know this. The restrictive voter-ID law, which targets a key block of potential Heitkamp voters, was proposed shortly after the Democrat won in 2012. It is entirely reasonable to suggest that the disenfranchisement of thousands of Native American voters could tip the balance this year against Heitkamp. That’s a doubly unsettling prospect because, as an analysis of the court’s decision for the American Civil Liberties Union notes, “In an election that may wind up being decided by just a few thousand votes, the court’s decision could be deeply consequential for the country, not just [for] those who live in North Dakota.”

No one knows what will happen between now and November 6. But the Supreme Court’s wrongheaded ruling creates the possibility, in this age of political turbulence, wave elections, and unexpected mobilizations, that Democrats could come to the verge of taking the Senate—only to see their prospects doomed by a narrow loss in North Dakota.

Democrats were not initially given much of a chance to take the Senate in 2018. With 26 seats that have been held by members of the Democratic caucus up for election November 6, versus just nine that have been held by members of majority leader McConnell’s Republican caucus, how could the Senate be up for grabs? But it is. Most Democratic incumbents, even those who were once seen as vulnerable (such as Wisconsin’s Tammy Baldwin and Ohio’s Sherrod Brown), have mounted strong reelection runs against uninspired Republican opposition. And Democratic candidates are mounting serious bids to flip red and purple states such as Arizona, Nevada, Tennessee, and Texas.

It’s still a long shot, but it is possible that Democrats and independents who align with the party could win 51 seats.

If Democrats win only 50 seats, however, Vice President Mike Pence will tip the balance in McConnell’s favor. Given the majority leader’s penchant for turning the chamber into a rubber stamp from President Trump’s policies and nominees, that would be a dismal result in a year that might otherwise see significant Democratic gains.

So the North Dakota race matters. Heitkamp is behind. But she has been behind before. To close the gap, she needs to mobilize voters who favor the state’s Democratic-Nonpartisan League Party (a hybrid organization that combines Democrats and old-school prairie populists) and independents who like her grassroots approach to politics and her willingness to break with both parties when it comes to defending North Dakota’s interests.

That will be dramatically harder if thousands of Native Americans are disenfranchised by the voter-ID law, as Justice Ruth Bader Ginsburg warns is a serious possibility. Rejecting the claim that voters can easily “adapt” to the new requirement—in the few weeks between now and the election—Ginsburg wrote in a dissent joined by Justice Elena Kagan: “That observation overlooks specific fact findings by the District Court: (1) 70,000 North Dakota residents—almost 20 percent of the turnout in a regular quadrennial election—lack a qualifying ID; and (2) approximately 18,000 North Dakota residents also lack supplemental documentation sufficient to permit them to vote without a qualifying ID.”

Ginsburg was incredulous at the fact that the court’s decision to uphold the North Dakota law means that IDs that were valid for the state’s June 12 primary will not be valid for the November 6 general election. The justice wrote: “Reasonable voters may well assume that the IDs allowing them to vote in the primary election would remain valid in the general election.” Instead, she suggested, they could face “grand-scale voter confusion.”

The court has created a voting-rights emergency in North Dakota. It could well influence the results of a key Senate race and the competition for control of the Senate. But it is about much more than that. This goes beyond parties and politics. This is a threat to democracy.

“We have to fight back,” says Oliver (OJ) Semans, who heads the Native American voting-rights group Four Directions. One strategy for responding is to have tribal officials stand outside polling places on election day with laptops that are equipped with software that can produce residential addresses for voters with IDs that feature only post-office box numbers. The officials could then issue a “tribal voting letter” that is valid as an ID.

The Standing Rock Sioux Tribe has announced that it will dispatch drivers to get voters to the polls and help them clear the hurdles. But the tribe warns that there is still a threat that voting will be hindered, that turnout will be undermined, and that North Dakota’s law—and the Court’s decision to uphold it—“will cause irreparable harm to the people of Standing Rock.”

With all of this in mind, tribal chairman Mike Faith has a question that all Americans should be asking themselves: “Why is it getting harder and harder for Native Americans to vote?”