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 from 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.”

Senate race sees Roy Moore up against Doug Jones in Alabama in tight race

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.

Alabama Senate race: Roy Moore vs Doug Jones Show all 12 1 /12 Alabama Senate race: Roy Moore vs Doug Jones Alabama Senate race: Roy Moore vs Doug Jones Democratic senatorial candidate Doug Jones speaks to reporters after voting Getty Images Alabama Senate race: Roy Moore vs Doug Jones Republican Senatorial candidate Roy Moore (L) and his wife Kayla ride their horses to the polling station to vote AFP/Getty Images Alabama Senate race: Roy Moore vs Doug Jones David Watson waves in a Santa suit as he holds a Doug Jones sign AP Alabama Senate race: Roy Moore vs Doug Jones Republican Senatorial candidate Roy Moore speaks to the media as his wife Kayla (R) looks on AFP/Getty Images Alabama Senate race: Roy Moore vs Doug Jones Democratic Alabama Senate candidate Doug Jones casts his vote at Brookwood Baptist Church REUTERS Alabama Senate race: Roy Moore vs Doug Jones Roy Moore speaks to the media after he rode in on a horse to vote AP Alabama Senate race: Roy Moore vs Doug Jones Democratic candidate Doug Jones greets supporters after casting his ballot AP Alabama Senate race: Roy Moore vs Doug Jones Republican Senate candidate Roy Moore departs on horseback after he cast his ballot in Gallant REUTERS Alabama Senate race: Roy Moore vs Doug Jones Voters wait in line to cast their ballot at a polling station setup in the St Thomas Episcopal Church Getty Images Alabama Senate race: Roy Moore vs Doug Jones Democratic Senatorial candidate Doug Jones (L) greets voters outside of a polling station at the Bessemer Civic Center Getty Images Alabama Senate race: Roy Moore vs Doug Jones Voters exit after casting their ballots at a polling station setup in the Fire Department Getty Images Alabama Senate race: Roy Moore vs Doug Jones Democratic Alabama U.S. Senate candidate Doug Jones speaks with the media after casting his vote at Brookwood Baptist Church Reuters

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.