For many years Barber, who is 53, was a familiar but fringe figure in North Carolina politics, a frequent protester with little following or impact. “He was the resident wackadoodle,” says Jonathan Felts, a North Carolina Republican political operative. “Everyone knew who he was, and no one listened to him.” Then on the last Monday of April in 2013, shortly after Republican lawmakers introduced an avalanche of conservative legislation that Barber deemed unusually “extremist,” he staged one of his protests in Raleigh. “This was the Easter season,” Barber recalls, “and we decided if they were going to crucify the poor, crucify the sick, crucify minorities, crucify public education, then every political crucifixion deserves a witness. So we had a service of self-purification.”

After an hour of prayer and protest inside the General Assembly building, Barber and seven fellow clergy members and nine activists — one of whom was in a wheelchair — were handcuffed and led away by the police. When Barber returned the next Monday to the General Assembly, he was joined by 100 protesters. The Monday after that it was 200. Within a few months, there were thousands. After a year of protests, more than 900 people had been arrested for civil disobedience. “It was almost as if folks were glad to have been shown a way,” Barber says. “It became a gathering place for resistance.” The Moral Monday movement, as it came to be known, was born.

It’s difficult to overstate the impact that the Moral Monday movement has had on North Carolina. In a narrow sense, it revived the state’s Democratic Party. Although Barber emphasized that he was spearheading a moral rather than a partisan movement, the party was such a mess that he became its de facto leader. “Barber really stepped in to fill the void of progressive leadership for Democrats here when they’d been put out completely in the wilderness,” says Tom Jensen, the director of the North Carolina-based Democratic polling firm Public Policy Polling. McCrory won by 12 points in 2012, but thanks in no small part to Barber, he had a negative public-approval rating by the end of the summer of 2013, and his numbers stayed underwater until he lost to Cooper. “You could paint a piece of cardboard beige and watch it dry and that would be more interesting to Democratic-base voters than Roy Cooper,” says the G.O.P. consultant Felts. “Barber and the Moral Monday crowd gave them a reason to be excited, to be active and to vote.”

Barber’s influence transcended electoral politics, reaching business leaders as well. Unlike in other Southern states, North Carolina’s business leaders were generally a moderating influence, until the 2010 Republican takeover. “A lot of people in the North Carolina business community over the last few years have spent a lot of time lobbying the legislature on corporate tax, unemployment and workers’ compensation,” Cooper complained to me, “and we’ve gotten away from the business community truly using political capital to have the legislature invest in education.” Even H.B. 2 was initially greeted with conspicuous silence by North Carolina’s Chamber of Commerce — most likely because, in addition to preventing city and county governments from enacting nondiscrimination ordinances, the legislation also prohibited municipalities from setting minimum-wage standards for private employers and limited how people could sue for discrimination in state court.

But Barber and his movement changed the political norms in North Carolina, to the point that business leaders started to feel sheepish about their rumspringa of deregulation and tax cuts and began distancing themselves from G.O.P. policies. The H.B. 2 debacle, in particular, brought the business community and North Carolina Democrats more into alignment, so much so that Cooper outraised McCrory by almost $8 million during the 2016 campaign. Some Republicans now accuse Cooper of underhandedly fighting to keep the H.B. 2 issue alive during the campaign by privately encouraging Democrats in the General Assembly to thwart any attempts to fix the law. “There were efforts by the then-attorney general and his campaign to sabotage any potential compromises throughout the process,” McCrory told me, “because it was working to their political advantage in both fund-raising and surveys.” (Cooper’s office denies this.)

Democrats in North Carolina comfort themselves with the belief that time is on their side. Although the “demography is destiny” argument lost much of its luster for national Democrats after the 2016 presidential election, in North Carolina, which experienced its political cataclysm a few years ahead of the rest of the country, the idea is once again in vogue. With the state’s rural areas continuing to empty out and its urban and suburban areas booming — in the last eight years, seven of North Carolina’s 100 counties have accounted for nearly 40 percent of the state’s voter-registration growth — Democrats, and even some Republicans, believe it will be hard if not impossible for the G.O.P. to draw the types of lopsided legislative and Congressional maps they produced after the post-2010 redistricting, especially with the courts already looking over their shoulders. “North Carolina is one click behind Virginia, two clicks ahead of Georgia and five clicks ahead of Texas in moving from red to blue,” says Morgan Jackson, Cooper’s chief strategist.

In the meantime, Cooper, hamstrung as he is by the General Assembly, has managed to maneuver his way to a handful of quiet victories. In April, he successfully thwarted a Republican attempt to shrink the state’s Court of Appeals, and thus tip its partisan balance in the G.O.P.’s favor. And the United States Supreme Court decided in May, on a technicality engineered by Cooper, to refuse to hear an appeal of a lower-court ruling that struck down North Carolina’s restrictive voting law. He’s spearheading the Democrats’ efforts to win enough legislative seats in the 2018 election to end the G.O.P.’s supermajorities so that, as he puts it, his vetoes won’t be automatically overridden and he will have “leverage to negotiate.” But Cooper knows that eventually he’s going to need bigger accomplishments to satisfy the grass-roots crusaders who helped put him in office. His H.B. 2 compromise has made that task even more urgent. “Cooper did the right thing as governor,” Paul Shumaker, a veteran North Carolina Republican strategist, says. “He did not do the right thing as a politician.”