Tuesday’s election for mayor of Manchester — “Manch-Vegas,” as it’s affectionately known — was a bet between Democrat Mayor Joyce Craig and Republican Jay Ruais.

Ruais ran on issues and policies and not much else. The Republican was a broken record on crime and homelessness, and he offered specific, concrete proposals to address them. No flowery speeches or personality pitches. The city had problems, Ruais had solutions, and he bet that would be enough.

Craig bet the other way. She was counting on Manchester Democrats voting like Democrats first, and citizens who live in Manchester second. Just wave the partisan flag, and their votes would pour in. People may hate seeing homeless camps downtown, but they hate voting Republicans even more.

On Tuesday, Craig lost that bet.

Part of the blame must be borne by Kevin Cavanaugh, whose heart never appeared to be in the race and whose head was an absolute no-show. If Cavanaugh had an original thought during the entire campaign, he apparently kept it chained to a radiator in his basement. At a time when city voters were frustrated with the status quo and looking for solutions, Cavanaugh campaigned like Kevin Bacon’s character in “Animal House”: “Stay calm, all is well!”

At the same time, Cavanaugh was never anything more than a Craig stand-in — Mayor Joyce 2.0. Offering solutions would have involved admitting the city had problems. And Craig wasn’t going to allow that. After watching her hand-picked successor lose to an unknown like Ruais, Craig released a statement praising the outstanding leadership of… Joyce Craig.

“During my six years as mayor, we’ve worked hard to make Manchester more affordable, keep our residents safe, and strengthen our schools,” Craig said.

And perhaps she has been working hard. But how many Queen City residents believe the city is “affordable and safe?” How many look at the dismal test scores in Manchester schools and consider them “strong?”

Craig didn’t care. Instead of giving Cavanaugh a playbook of solutions, she told the Ol’ Coach to just talk about growing up in Manchester and give a cheer for the Democratic Party. She got Democrats Sens. Maggie Hassan and Jeanne Shaheen to rally the fans, too.

For Democrats like Craig, who live and die for the party, that was enough. For the small-business owners and struggling taxpayers, it wasn’t.

Not quite.

And that is the bad news for Republicans. Ruais won this race by a whisker.

By any objective measure, Ruais should have rolled to an easy victory. The people of Manchester are clearly unhappy and ready for a change. Ruais — young, smart, and energetic — was the ideal kind of Republican for this race. He’s not engaged in social issues, and he doesn’t have a MAGA bone in his body. And he had the added advantage of running against “Gramps” Cavanaugh, a guy who makes Wilfred Brimley look like Johnny Knoxville.

And yet the best Ruais could muster was a narrow 51-49 percent win. Nearly half of the city’s voters were willing to step over homeless people to get to the polls and vote for more of the same. To vote party first.

Part of that is likely attributable to Donald Trump. His impact on the Republican Party’s brand, particularly in New England, is hard to overstate. And having Republicans in Congress producing their own version of “Jackass” the past month or so didn’t help, either.

But if negative partisanship can reach the point where elected officials are only judged by their party and not by their performance, our democracy won’t work. If voters forget that they actually deserve public service from their public servants, our system won’t survive.

If Mayor Ruais turns Manchester around, if residents start seeing results from their decision to trust him with their votes, that would be very good news for New Hampshire politics and our democratic system.

And it would have the added benefit of being very bad news for Joyce Craig next November.