Alabama is a place with an awful lot of history. It’s known as a state that was at the centre of the slave trade, which fought a bloody civil war to try and keep hold of it, and even when it was gone, it long pushed for a system of segregation between the races and discrimination against black people. At the State Capitol in Montgomery, just yards from where Roy Moore’s supporters gathered, Governor George Wallace notoriously declared at his 1963 inauguration: “I say segregation now, segregation tomorrow, segregation forever.”

But it is also a place of hard-won political change. Down the hill is a memorial for Rosa Parks, who in December 1955 refused to give up her seat for a white passenger and sit in the so-called “coloured section” of a bus. It was to Montgomery that Martin Luther King led the marchers from Selma, a bloody and lethal endeavour that helped persuade President Lyndon Johnson to pass the 1965 Voting Rights Act.

It would be offensive and wrong to equate the struggles of the civil rights era with Doug Jones’ stunning victory on Tuesday night in the Alabama Senate race. But Jones’ win over Moore carried with it no small burden of unlikeliness and effort.

“I have always believed that the people of Alabama have more in common than divides us,” Jones told his supporters in Birmingham, while Moore sulked and refused to concede defeat.

“We have shown, not just around the state of Alabama, but we have shown the country the way – that we can be unified.”

The night before, at his final rally, Jones was joined on stage by Randall Woodfin, the recently elected mayor of Birmingham, who had overcome the odds to beat the long-term incumbent, William Bell.

“I know what it’s like to climb an uphill battle against people telling you, ‘You can’t win’,” he said. “Let me be the first to tell you: It can be done.”

And so it was. While Moore was still claiming he could seek a recount if the result was within less than half-a-per-cent, a tally collated by the New York Times showed Jones had won 671,151 votes to Moore’s 650,436, giving the Democrat a 49.9-48.4 victory.

There are several takeaways from this week’s result. It was a humiliation for Donald Trump, who had endorsed Moore and mocked Jones. It also raises questions about the viability of Steve Bannon’s push for so-called insurgent candidates in the 2018 elections. He had hoped a win here would give momentum to that plan, in which he intended to target the Republican leadership of Mitch McConnell and Paul Ryan. With Republicans already blaming Bannon for losing one of the safest seats in the country, that may now come to little.

Democrats ought not to read too much into the victory. Not every candidate they encounter in 2018 will be facing multiple allegations of child sexual assault and abuse (accusations Moore strongly denies). And they would be wise not to start making too many assumptions about 2020.

Despite what Hillary Clinton claimed, just because Jones won in Alabama, it does not mean Democrats are going to win everywhere. There are an awful lot of red conservative states, and, as a result of Moore’s defeat, there are likely to be fewer hardcore candidates than Bannon would have wished to see.

Yet for progressives and Democrats, for those still licking their wounds from Trump’s defeat over Clinton, the drama in this southern state, where Trump trounced Clinton in the 2016 presidential election, has given them something finally to cheer, a really staggering and surprising win. For many, it has provided hope. Sweet hope Alabama.