North Carolina Democrats thought the stars had finally aligned for smashing victories in 2020.

A controversial Republican president was at the top of the GOP ticket. Gov. Roy Cooper was posting double-digit leads for re-election. Court-ordered redistricting created new opportunities to flip the General Assembly. A gigantic gusher of campaign cash gave Democratic candidates for U.S. Senate, Council of State, Supreme Court, and other contests such a resource edge that they were able to dominate the airwaves, mailboxes, and digital media.

The state’s political stars were aligned, all right. Only, the Democrats were looking at the wrong constellation.

They had huge advantages: funding, favorable media coverage, months of apparent momentum from exaggerated polling leads. But in a series of tight statewide and local races, North Carolina Republicans had some advantages of their own. They recruited strong candidates. They were out canvassing, turning out their base. And to swing voters who trusted Democrats more to fight COVID but trusted Republicans more to rebuild the economy, GOP candidates offered a tie-breaking message: We stand for order, not chaos.

Democrats never had a clue, I think, how poorly they handled the protests over the summer and fall that, all too frequently, devolved into destructive riots. North Carolinians are a fair-minded people. Regardless of party and ideology, their hearts bleed when they witness events like the tragic death of George Floyd. They support reasonable efforts to improve policing and deescalate violent confrontations.

But they do not support defunding the police, or reducing funds for police, or hamstringing the police. Republican candidates for legislature and other offices took a clear position on this issue. Democrats hedged, foolishly.

As if to punctuate the point, even as Democrats were having a disappointing night in North Carolina, a throng of black-clad demonstrators marched through the streets of the state capital, shouting “Abolish the R.P.D.!” (the Raleigh Police Department).

Of course, there was a lot more going on here than the public safety issue. Thom Tillis gained vigor from Cal Cunningham’s self-inflected wound. Republican candidates such as Catherine Truitt (state superintendent of public instruction), Dale Folwell (state treasurer), and Josh Dobson (labor commissioner) ran effective and substantive campaigns on entirely different issues.

And, obviously, Gov. Roy Cooper was re-elected. As I have previously observed, split-ticket voters may be rare. That doesn’t make them extinct. As he did four years ago, Cooper got the votes of North Carolinians who simultaneously voted Republican for president, U.S. Senate, Supreme Court, and legislature.

Why? Cooper benefits from his decades of presence on statewide ballots. Among conservative Democrats and GOP-leaning independents in rural areas, he still retains a moderate image. Moreover, I think the Republican nominee, Dan Forest, turned off some of those voters by seeming not to take COVID-19 seriously.

Even so, the governor beat Forest by about 4.5% — hardly the blowout that pollsters, pundits, and the Cooper team predicted. In his election-night remarks, he called for unity. “Today and for the next four years I will work hard to be the governor of every North Carolinian,” he said.

Such a change of approach would be most welcome.

Setting aside the national drama, what played out in North Carolina this year was a massive, expensive, well-coordinated effort by the Democratic Party to re-establish dominance over state government after a decade of either Republican governance or partisan gridlock.

With Cooper’s re-election being the major exception to the rule, the Democrats’ effort essentially failed. Their carefully crafted, widely disseminated messages flopped. North Carolinians don’t want to repeal the past 10 years of GOP-driven reforms. They don’t want higher taxes, heavier regulations, and fewer choices in education and other public services. While they remain greatly concerned about COVID-19, they don’t accept anemic job creation and lengthy recession as the price they must pay to combat the virus.

And they don’t want their downtowns trashed by rioters and looters who disguise their destructive ends with the garb of “social justice.” By misfiring on these and other issues, Democrats threw away their shot.

John Hood (@JohnHoodNC) is chairman of the John Locke Foundation and appears on “NC SPIN,” broadcast statewide Fridays at 7:30 p.m. and Sundays at 12:30 p.m. on UNC-TV.