The Rev. William J. Barber II, a Protestant minister, is president of the North Carolina NAACP, president of Repairers of the Breach, a progressive ecumenical organization, and founder of Moral Mondays, a grass-roots movement for racial and economic justice. He is the author of "The Third Reconstruction: Moral Mondays, Fusion Politics, and the Rise of a New Justice Movement." The opinions expressed in this commentary are his.

Even as Republicans across the South and Midwest rode the coattails of Donald Trump's victory to greater control of state governments, McCrory was the only incumbent Republican in the country to lose a statewide race.

This is a victory for North Carolina and the "Moral Mondays" movement that arose to resist McCrory's extremism. For anyone committed to resisting extremism in the coming Trump years, McCrory's failed one-term governorship is a case study worthy of attention.

When McCrory became governor-elect four years ago, I sat down with him to discuss the 14-point moral agenda that a broad coalition of justice organizations had committed to pursue together in this state that went for Obama in 2008 and Romney in 2012.

We knew well that the expansion of voting rights we had won in the 2007 legislative session was under attack by Republican strategists in North Carolina and beyond. They had invested millions in state legislature races in 2010 to regain control and gerrymander voting districts to "crack and pack" our coalition of voters. Only by securing all three branches of government could they complete the makeover of North Carolina they had promised (a set of promises that were echoed by the Trump campaign this year).

McCrory's broad smile echoed his optimism when he talked about getting North Carolina's economy working again. Celebrated as a moderate mayor in Charlotte, our state's largest city, McCrory was glad to sit and listen to our concerns. "I'll meet with you once a month if you will promise not to criticize this administration in public," McCrory told me. Politics, he believed, was the art of negotiating deals in private. But we had already learned what every American must understand in the coming Trump years: Democracy depends on everyday people standing together in public, refusing to be divided by those who fail to serve the common good.

McCrory came into office in 2012 through a backroom deal designed to fracture our moral coalition. Confident that black religious voters could be split off from marriage equality advocates, Republicans put Amendment One on the 2012 primary ballot to define marriage in the state constitution as a union between one man and one woman. McCrory's coalition of voters was baited by fear of same-sex marriage, much as Trump appealed to our fear of immigrants, Muslims and protesters in this year's campaign.

North Carolina's 2013 legislative sessions exposed McCrory's inability to stand up to the extremism that had brought him to power. While Republican governors like John Kasich expanded Medicaid to insure health care for citizens of his state under the Affordable Care Act, McCrory went along with extremists in the Legislature and denied Medicaid expansion to half a million North Carolinians.

A majority of those who were denied access to health care were poor, white people in rural counties who had voted for McCrory. When a fellow Republican mayor from Belhaven, North Carolina, reached out asking McCrory to help save the town's hospital , McCrory said there was nothing he could do.

Later that summer, the Supreme Court's Shelby decision removed preclearance requirements for changes to voting laws in states formerly covered by the Voting Rights Act. Within days, McCrory signed the worst voter suppression bill in the nation. The North Carolina NAACP sued immediately, and after three years of litigation, a federal court made clear the law had intentionally targeted African-Americans with "almost surgical precision."

But North Carolinians knew we could not afford to wait quietly while democracy was under attack. In spring 2013, when the voter suppression bill was still making its way through the Legislature, "Moral Mondays" emerged as the direct action of concerned citizens against the unconstitutional takeover of our state.

Over a thousand North Carolinians were arrested in the largest state-government focused civil disobedience campaign in US history (arrests that would later be thrown out by a state superior court judge). We took our stand in public, and we exposed the vulnerability of divide-and-conquer tactics to cross-racial, cross-class fusion coalition building.

Follow CNN Opinion Join us on Twitter and Facebook

In this year's re-election bid, McCrory's team tried to use HB2, the so-called "bathroom bill," to rally a base around fear of transgender neighbors. It didn't work. We pointed out that the bill wasn't about bathrooms at all. HB2 attempted to codify discrimination, denied all North Carolinians the right to challenge employment discrimination in state court, and overrode municipal living wage campaigns.

That's why workers stood with preachers and LGBTQ activists stood with the business community to oppose the bill. This moral, fusion organizing effort persuaded a majority of North Carolinians to make McCrory the first governor in our state's history to lose a re-election bid.

Along with much of the rest of the country, North Carolina fell victim this year to the extremism exploited by Donald Trump. But we could not be deceived by the extremism we have endured under Pat McCrory. Though we know too well that America faces some tough days ahead, this moral victory should give all Americans reason to hope that we can revive the heart of our democracy and move forward together to a more perfect union.