While the news last week focused on reports of Russian interference in US elections, Republicans in North Carolina were busy subverting democracy at home.

What began as a special legislative session to help victims of Hurricane Matthew quickly turned into something very different when the GOP-controlled legislature hastily passed a series of bills stripping incoming Democratic Governor Roy Cooper of his constitutional powers. Most noteworthy, Cooper will no longer get to appoint a majority of members to the state board of elections or 100 county boards of elections, and the state board will be chaired by a Republican in all even-numbered years—i.e., any time there’s a major congressional, statewide, or presidential election. With Republicans holding a super-majority in the legislature, this is a guaranteed prelude to future voter-suppression efforts. The bill also makes it harder for the state Supreme Court, which has a 4-3 Democratic majority, to review future challenges to election-law changes. Outgoing Republican Governor Pat McCrory signed the bill 48 hours after it was first introduced.

In addition, Republicans reduced the number of public employees the governor could appoint—from 1,500 to 425—prevented the governor from appointing members to boards of state universities, and required the governor’s cabinet picks to be confirmed by the legislature. These moves have been described as “a brazen power grab,” but they are more akin to a coup.

Republicans have turned North Carolina, previously one of the most progressive states in the South, into a laboratory for voter suppression and offered a disturbing preview of what’s to come under Trump. The legislative coup is merely the latest in a series of outrageous and illegal actions by the North Carolina GOP to undermine democracy in the state.

First, after taking power after the 2010 election for the first time since 1870, North Carolina Republicans gerrymandered legislative and congressional districts by resegregating the state politically in violation of the Voting Rights Act. Federal courts have already struck down two congressional districts for racial gerrymandering and ordered new elections for 28 General Assembly districts next year. In other words, the legislature that stripped power from the next Democratic governor was elected by illegal means.

Second, a month after the Supreme Court gutted the Voting Rights Act in June 2013, the North Carolina legislature passed the country’s worst voter-suppression law. The “monster” bill required strict voter ID, cut early voting, and eliminated same-day registration, out-of-precinct voting, and preregistration for 16- and 17-year-olds. The United States Court of Appeals for the Fourth Circuit found that North Carolina’s law targeted African Americans “with almost surgical precision” and was “as close to a smoking gun as we are likely to see in modern times.”

Third, even after the courts restored a week of early voting in 2016, GOP-controlled county election boards limited early-voting hours and polling locations. The executive director of the North Carolina Republican Party called on Republicans to make “party line changes to early voting” that included opposing polling sites on college campuses and prohibiting early voting on Sundays, when black churches held “Souls to the Polls” voter mobilization drives. The North Carolina GOP bragged before Election Day that “African American Early Voting is down 8.5% from this time in 2012. Caucasian voters early voting is up 22.5% from this time in 2012.” After aggressively using their majorities on state and local election boards to suppress votes, Republicans then took those majorities away from the new Democratic governor.

Fourth, despite all of these suppression efforts, Cooper managed to defeat McCrory—the only race in 2016 where Democrats picked up a governor’s seat in a state Trump carried. But McCrory refused to concede for nearly a month, spreading bogus allegations of voter fraud that included wrongly accusing a 101-year-old World War II veteran of voting twice.

The pattern in North Carolina is clear: When Republicans win, they suppress the Democratic vote to solidify power in future elections. And when they lose, they rig the rules to prevent their opponents from being able to fairly exercise and maintain power. This is what happens in a dictatorship, not a democracy. And it’s a preview of what’s to come in Trump’s America.

I’ve written that Trump is the greatest threat to American democracy in our lifetime because, unlike his Democratic or Republican predecessors, he has little respect for basic democratic institutions like a free press or a fair election. But Trump is also such a threat because his party, as we’re seeing in North Carolina, has displayed the same brazen disregard for the will of the people. And now it will control the White House, the Congress, the courts, and two-thirds of state legislatures.

It’s becoming increasingly clear that the struggle to preserve what’s left of American democracy will be a defining fight of the Trump era.