There shouldn’t be much of a contest in a political race pitting an accused pedophile against a prosecutor who helped send Klansmen to jail for blowing up a church.

But it was chalked up as a surprise Tuesday when Alabama voters picked Democrat Doug Jones over Republican Roy Moore — a race decided by a single percentage point.

Alabama is a conservative state — more so than Louisiana — and Jones’ views often did not match the tastes of the electorate, especially on abortion. So it’s a credit to Alabama voters that they looked deeper and chose a man who is actually suited to represent their state in the U.S. Senate for the next three years. They were aided by their senior senator, Richard Shelby, who led by example in announcing that he would cast a write-in vote — a path followed by 23,000 Alabamians. Those votes would have put Moore over the top.

The outcome called to mind Louisiana’s 2015 gubernatorial election, when voters were turned off by Republican U.S. Sen. David Vitter’s sexual transgressions and instead cast their lot with John Bel Edwards, who was at the time a little-known Democratic state representative.

It’s up to the voters of Alabama to define the limits of their fealty to the Republican Party. But Tuesday’s voting shows that there are boundaries. The GOP has been plagued by Senate nominees who were ideologically pure for primary voters but who lost winnable seats in a wider electorate — from Nevada to Delaware, and now even in Alabama.

Our Views: 2015 defies the prognosticators of politics