
Democrat Doug Jones scored a stunning upset in the Alabama Senate race and proclaimed a victory for 'common courtesy and decency' as he defeated accused pedophile Roy Moore – but Moore quickly said he wasn't done.

'Realize when the vote is this close, then it's not over,' said Moore, who exasperated national party establishment leaders with his run. 'And we've still got to go by the rules about this recount provision.'

'We also know that God is always in control,' Moore told his supporters, who were left stunned at their party in Montgomery as the race got called for Jones.

Jones defeated Moore by 50 to 48 per cent of the vote, with 99 per cent of precincts reporting. There were just under 21,000 votes separating the winner and the loser, out of 1.3million cast.

John Merrill, the secretary of state of Alabama, said Moore can get a recount if he pays for it. An automatic recount occurs if the vote difference is less than 0.5 per cent of the vote.

Scroll down for video

Democratic candidate for U.S. Senate Doug Jonesand his wife Louise step on stage during an election-night watch party Tuesday, Dec. 12, 2017, in Birmingham, Ala.

In a stunning victory aided by scandal, Democrat Doug Jones won Alabama's special Senate election on Tuesday, beating back history, an embattled Republican opponent and President Donald Trump, who urgently endorsed GOP rebel Roy Moore despite a litany of sexual misconduct allegations

Confetti falls as Democrat Doug Jones and his wife Louise wave to supporters following Tuesday's landmark election in Alamaba

Doug Jones kisses his wife Louise Jones as the couple celebrate at the senator-elect's election night gathering in Birmingham

Jones hold s a young family member as they celebrate his Senate victory at an election night party in Birmingham on Tuesday night

'The people of Alabama have spoken tonight. They've made their voice heard loud and clear,' he told CNN. Merrill said it would be 'highly unlikely' for Jones not to be certified the winner.

Moore complained in his speech: 'Part of the problem with this campaign is we've been painted in an unfavorable and unfaithful light.'

'We've been put in a hole, if you will,' he said, referencing the Bible's Psalm 40 and speaking rapidly.

'I waited patiently for the Lord. That's what we've got to do,' Moore told his supporters, who include many evangelical voters. 'And he inclined to me and heard my cry and brought us also out of a horrible pit out of the miry clay and set my feet on the rock and established my goings and put a new song in our mouth. He then prays unto our God. Many shall see it hear it, and shall be moved by that if you will.'

'And that's what we've got to do is wait on God and let this process play out,' Moore said.

'But the votes are still coming in and we're looking at that,' Moore added. 'It's not over, and it's going to take some time. Thank you.'

Jones' victory in the deep red state came despite a final push by President Donald Trump, who campaigned in Pensacola and endorsed Moore despite a series of women who made accusations against him from when he was a prosecutor in the late 1970s and early 1980s.

His win peeled back the Senate GOP's Republican majority to just 51-49, and dealt a blow to Trump, who weighed in with campaigning in nearby Florida, tweets and a robocall.

'Tonight is a night for rejoicing,' Moore told cheering supporters at his victory speech Tuesday evening.

After a nasty race that featured multiple women accusing opponent Roy Moore of sexual misconduct, Jones told a Birmingham crowd: 'We have work to do. We have work to do in this state to build those bridges within this state, to reach across with those that didn't vote for us to try to find that common ground. I'm pledging to do that tonight.'

After the divisive contest, Jones thanked his African-American supporters, Hispanics, and even wished his Jewish friends a 'Happy Channukah!' That was a subtle rebuke to Moore's wife, who made a cringe-worthy election eve comment denying anti-Semitism by saying one of their lawyers was Jewish.

Republican US Senate candidate Roy Moore takes the stage upon arriving at his election night party in Montgomery, Alabama, on Tuesday

Jones defeated Moore by 50 to 48 per cent of the vote, with 99 per cent of precincts reporting. There were just under 21,000 votes separating the winner and the loser, out of 1.3million cast

John Merrill, the secretary of state of Alabama, said Moore can get a recount if he pays for it. An automatic recount occurs if the vote difference is less than 0.5 per cent of the vote

Moore walks off stage with his wife Kayla (second right) after telling his supporters he would not concede defeat till all the votes were in and possibly demand a recount

'As Dr. King liked to quote, the moral arc of the universe is long, but it bends toward justice,' he said, using a favorite line of President Obama's. 'Tonight in this time in this place, you helped bend that moral arc a little closer to that justice,' he said to applause.

'Not only was it bent more, not only was its aim truer, but you sent it right through the heart of the great state of Alabama in doing so,' he said.

'It was every community. You know I keep hearing about the different communities in this state. The African American community - thank you! My friends in the Latino community thank you! To all my Jewish friends, Happy Chanukah!

'At the end of the day this entire race has been about dignity and respect,' Jones said. This campaign has been about the rule of law. This campaign has been about common courtesy and decency and making sure everyone in this state ... is gonna get a fair shake in life.'

The Associated Press called the Alabama Senate race for Doug Jones on Tuesday less than two and a half hours after the final votes were cast.

For Jones, just having a (D) next to his name meant an extremely steep climb in a state that hadn't voted for a Democratic senator in 31 years – and that man, Sen. Richard Shelby, later changed his affiliation to Republican.

But Jones was buoyed by a mix of grit and chance – campaigning rabidly through the end, while Moore traveled out-of-state, haunted by accusations that he had pursued and molested teenagers while he was a man in his 30s.

The election had become bigger than these two men, with Trump's name – and also that of his former Chief Strategist Steve Bannon – also attached to Moore's name on the ballot.

Democrat Doug Jones, photographed at a Birmingham campaign rally on Sunday, was proclaimed victor by the Associated Press at 9:23 p.m. local time on Tuesday night

Supporters of Democrat Doug Jones cheer out as the Democrat surprisingly wins a Senate seat in deep red Alabama

An ecstatic Doug Jones supporter holds up a sign at the Democrat's election night party in Birmingham, Alabama

Supporters celebrate at the election night party for Democratic Alabama US Senate candidate Doug Jones in Birmingham

Jones' victory in the deep red state came despite a final push by President Donald Trump, who campaigned in Pensacola and endorsed Moore despite a series of women who made accusations against him from when he was a prosecutor in the late 1970s and early 1980s. Pictured above, supporters celebrate Jones' win

WHO IS DOUG JONES? MEET ALABAMA'S NEWEST U.S. SENATOR Doug Jones, a Democrat who once prosecuted two Ku Klux Klansmen in a deadly church bombing and has now broken the Republican lock grip on Alabama, is the state's new U.S. senator. Here are some facts about Jones: CLOSE TO HOME Jones, 63, grew up in the working-class city of Fairfield, just west of Birmingham, an area where steel mills once belched smoke that left a rust-colored haze hanging over the metro area. His father was a steelworker and so was one of his grandfathers; the other worked in a coal mine. Jones spent time working in a mill when not in school. Now an attorney in private practice, Jones lives just a few miles from his hometown in the hilly suburb of Mountain Brook, Alabama's richest locale with an average family income estimated by the US Census Bureau at $225,000 annually. DEMOCRATIC ROOTS Jones got his start in government as an aide to the last Democrat elected to the US Senate from Alabama, the late Howell Heflin. After graduating from Samford University's law school in 1979, Jones worked as staff counsel to the Judiciary Committee for Heflin, and Jones still considers Heflin a role model. Heflin cited his health in retiring from the Senate, and Republican Jeff Sessions was elected to replace him in 1996. Jones will now assume the seat vacated by Sessions when he was nominated as US attorney general by President Donald Trump. Republican appointee Luther Strange has held the seat in the interim. CHURCH BOMBING Years before running for Senate, Jones made a name for himself prosecuting two KKK members for the bombing of Birmingham's 16th Street Baptist Church, a brutal crime that killed four black girls in 1963. One Klansman was convicted in the blast in 1977, and a renewed investigation was underway by the time President Bill Clinton appointed Jones as US attorney in Birmingham in 1997. Jones led a team of federal and state attorneys during trials that resulted in the convictions of Thomas Blanton Jr in 2001 and Bobby Frank Cherry in 2002. Last year, Jones was among the speakers who urged Alabama's parole board to refuse an early release for Blanton. The board agreed, and Blanton remains in prison serving life for murder. PARTY GUY Alabama's Democratic Party has been on life support since Republicans gained ascendency years ago, holding no statewide offices and a minority in each legislative chamber, but Jones supported an effort to revive the organization in 2013. A former party chairman formed the Alabama Democratic Majority to raise money and recruit candidates, and Jones was among those publicly supportive of the effort. The foundation was dormant by 2014, but Trump's victory has helped breathe new life into local organizations, including the Democratic Party in Republican-heavy Shelby County, where officials say membership has jumped from around a dozen to more than 200 people since the 2016 election. Jones' victory can only help re-energize the party even more. Advertisement

On the Democratic side, former President Obama, Vice President Joe Biden and potential 2020 candidate Sen Cory Booker, of New Jersey, had chimed in.

President Trump tweeted his congratulations to Jones on a 'hard fought victory,' less than an hour after the race was called.

'The write-in votes played a very big factor, but a win is a win,' Trump added. 'he people of Alabama are great, and the Republicans will have another shot at this seat in a very short period of time. It never ends!'

For most of the night, Moore held a comfortable lead in the deeply Republican state.

At his Montgomery, Alabama, election night party, campaign staff flashed a giant version of the New York Times' vote-tracking website onto a large screen, as audiences members would occasionally scream.

'The numbers are only going to get higher for Judge Roy Moore,' said a spokeswoman for Moore, Janet Porter, who was addressing the crowd at the Montgomery, Alabama event shortly before 8:00 p.m., an hour after the polls closed.

Lurking below, however, were ominous signs that an upset, or a recount, could be on the horizon, with the New York Times' live estimate predicting a Jones win for most of the night.

'We're not calling this race,' longtime Moore supporter Rich Hobson announced to the room as Jones' name was lit up blue on the giant version of the Times' website.

He then asked the audience to pray.

Reactions from around the political universe came swiftly and were brutal to Bannon, who establishment Republicans cast as an interloper who cost them an easy Senate seat, making the map more challenging next year.

A Republican strategist told DailyMail.com that Tuesday night 'will be Steve Bannon's political epitaph.'

'There's no way to see this other than a huge defeat for the GOP, and it's mostly because Bannon bamboozled the president with his Svengali pocket-watch,' the veteran of more than 20 congressional elections said.

'Mitch McConnell will take some lumps,' he added, 'but this was all Bannon's doing. And political capital at Breitbart has just fallen through the floor tool.'

Breitbart News, a conservative website where Bannon is executive chairman, had pushed hard for Moore.

Republican Roy Moore should have easily slid into a Senate seat in Alabama, but accusations that he habitually preyed on teenagers eroded his support. Here he's photographed at his election night party in Montgomery before the final results were in

Roy Moore's supporters hug in sadness as the election is called for Democrat Doug Jones less than two and a half hours after polls closed

Roy Moore's supporters hug as he loses the race in a historic upset to Democrat Doug Jones, who's the first Democrat to win a Senate seat in Alabama in 31 years

Candidate Roy Moore (second from right) watches election returns roll in from a backroom at the RSA activity center where he's holding his election night event. He's flanked by Janet Porter (second from left) who gave a rousing speech early in the night

Mike Tate (left) holds his son Seth as he and his family await the arrival of Roy Moore at the Republican's election night party in Montgomery, Alabama

Democrat Doug Jones spoke to reporters outside his Mountain Brook, Alabama polling place after he placed a vote for himself on Tuesday

'This is a brutal reminder that candidate quality matters regardless of where you are running,' said Senate Leadership Fund President and CEO Steven Law in a statement. 'Not only did Steve Bannon cost us a critical Senate seat in one of the most Republican states in the country, but he also dragged the President of the United States into his fiasco.'

Sen Cory Gardner, who chairs the National Republican Senatorial Committee, which dropped Moore after the sexual misconduct allegations came out, made a hail Mary pass and said he hoped Jones would 'truly represent Alabama by choosing to vote with the Senate Republican majority.'

Meanwhile Democrats were ecstatic.

Right out of the gate, the party's 2016 nominee Hillary Clinton tweeted her glee.

'Tonight, Alabama voters elected a senator who'll make them proud,' Clinton wrote. 'And if Democrats can win in Alabama, we can – and must – compete everywhere.'

'Onward,' she wrote.

Early exit polls suggested that Moore might see some trouble.

Alabama voters were split on their opinion of President, Moore's most high-profile supporter, 48 to 48 per cent and held common views of the Republican and Democratic parties, with 44 per cent viewing the GOP favorably and 43 per cent seeing the Democrats positively.

However, the exit polls showed good news for Moore too, with 55 per cent saying the sexual misconduct allegations against him.

At a polling location in Ozark, Alabama, 74-year-old Moore supporter Sue Sleeper predicted her guy was on track for a win.

'He's not going to pull an upset,' she told DailyMail.com of Jones. 'He's going to win,' she said of Moore.

Pointing again to the Democratic hopeful, she pointed to the slew of television advertisements he had aired.

'The other one, he was constantly irritating me on my TV,' she said. 'And on top of it, he's real hard to look at.'

However, Ozark resident Jerome Dudley, 69, was pulling for Jones.

A political independent, Dudley told DailyMail.com he decided to go with Jones after Alabama Sen. Richard Shelby, a Republican, said he wasn't voting for Moore and would write in a 'distinguished Republican' instead.

Dudley also pointed out how Attorney General Jeff Sessions, who held the seat the Jones and Moore are vying for, wouldn't say who he had voted for.

Roy Moore's spokesman Ted Crockett (right) went on CNN Tuesday night and told Jake Tapper (left) that the candidate 'probably' thought homosexual conduct was a crime

Ben Smith holds up a sign at Roy Moore's election night party in Montgomery, Alabama, steps from the Alabama Capitol Building

Moore supporter Debra Napier is comforted by an unidentified man as they attend the Senate candidate's election night party in Montgomery

Moore supporter Greg Leblanc participates in the pledge of allegiance during an election-night watch party at the RSA activity center for Moore in Montgomery

Guests, including one holding a sign saying, 'Blacks for Trump 2020.com for Moore', pray during the invocation at Republican U.S. Senate candidate Roy Moore's election night party in Montgomery,

Supporters of Republican senatorial candidate Roy Moore, incluing one holding a sign reading 'In your hearts you know he's right', wait for polls results at an election night party in Montgomery

A supporter of Republican senatorial candidate Roy Moore wearing a 'Make America Great Again' hat watches polling results at Moore's election night party in Montgomery

The allegations that Moore had groped a 14-year-old girl had also disturbed the voter.

'That's a baby!' Dudley said.

Most of Moore supporters DailyMail.com talked to at Monday's Drain the Swamp rally, which featured a fake swamp outside, and at the polls today, said they didn't believe the allegations.

'I believe in him and I don't believe all the stuff that they're saying about him,' said April Foshe who declined to give her age, but identified as a longtime Republican voter and Trump supporter from Ozark.

Moore offered his final words on the topic Monday calling the Washington Post story a 'terrible, disgusting article.'

'These women,' Moore said, 'had not come forward for 34 years, but they waited 30 days before this general election to come forward'.

Beyond having to respond to the sexual assault and harassment allegations, the final stretch was a chaotic and colorful one for Moore.

On election eve, the embattled Senate candidate appeared at a rally alongside a handful of favorites from the right including former White House Chief Strategist Steve Bannon, Rep Louie Gohmert, a congressman from Texas, and Sheriff David Clarke, a black law enforcement officer from Milwaukee County who is a frequent critic of Black Lives Matter.

While Bannon chose to slyly pick a fight with Ivanka Trump from onstage of Jordan's Activity Barn in Midland City – twisting her criticism of Moore into 'There's a special place in hell for Republicans who should know better' – it was the comments made by Moore's wife and his Vietnam buddy Bill Staehle that garnered the most attention.

Staehle – attempting to defend Moore against pedophilia allegations – told the audience about the time the two ended up, accidentally, in an underage brothel in Vietnam.

'We shouldn't be here, I'm leaving,' Moore said, according to Staehle's account.

'That was Roy, honorable, disciplined, morally straight, highly principled,' Staehle said.

A Jones suppoter holds a sign reading 'The spotlight is on Alabama' as he watches election returns during an election night gathering the Sheraton Hotel

Jones (his supporters pictured above) was buoyed by a mix of grit and chance – campaigning rabidly through the end, while Moore traveled out-of-state, haunted by accusations that he had pursued and molested teenagers while he was a man in his 30s

The election had become bigger than these two men, with Trump's name – and also that of his former Chief Strategist Steve Bannon – also attached to Moore's name on the ballot. Pictured above, Jones supporters on election night

Roy Moore and others are directed toward his election night party in Montgomery, Alabama, on Tuesday evening

President Trump's trademark 'Make America Great Again' hats were on display at Roy Moore's election night shindig in Montgomery, Alabama

Moore opted to ride a horse to his polling station on Tuesday in an election he lost to former chief justice of the Alabama Supreme Court and Democrat Doug Jones

Surrounded by members of the media, Republican Alabama Senate candidate Roy Moore ides off on horseback after voting in Gallant

Roy Moore showed up on horseback and wearing a cowboy hat as he gave himself a vote in Tuesday's special election in Alabama

The Moore's wife Kayla took the stage and tried to push back against what she considered 'fake news,' suggesting it was the media's fault that people think her husband 'doesn't support the black community' nor do they like Jews.

'I tell you all this because I see you all and I want to set the record straight while they're here,' she said motioning to the slew of journalists at the back of the room during the election eve event.

'One of our attorneys is a Jew,' Kayla Moore said.

'We have very close friends that are Jewish, and rabbis, and we also fellowship with them,' she said, after saying she and her husband had fellowship with members of the black community as well.

Moore was cast as anti-Semitic after he suggested that Democratic donor George Soros, who is Jewish, is going to hell.

On election day morning, as Democrat Jones put on a defiant face at his polling location across the state, Moore made more of a splash.

Moore arrived to the polls atop his horse 'Sassy,' as wife Karla trotted in on horseback as well.

The candidate would head two hours south to Alabama's capital Montgomery, for his election night party just blocks from the state's capitol.

The venue is just a block away from where Moore served twice, and was twice removed, from the state Supreme Court.

Meanwhile Moore's spokesman Ted Crockett went on CNN Tuesday night with the polls only open for several hours more and told Jake Tapper that the candidate 'probably' thought homosexual conduct was a crime.

'It's just a sin, OK? That's what it is,' Crockett said, outlining Moore's right-wing Christian beliefs.

Jones spent more time on the campaign trail in the run-up to today's vote.

He brought in popular black Democratic politicians – New Jersey's Booker and former Massachusetts Gov. Deval Patrick – and had basketball legend Charles Barkley speak on his behalf Monday night.

The campaigns also had dueling presidential robocalls at their disposal with Trump recording one for Moore and President Obama and Vice President Biden doing the same for Jones.

The president had originally teamed up with Senate Majority Leader Mitch McConnell in support of Sen. Luther Strange in the GOP Alabama primary, as the state looked to permanently fill the seat once held by Trump's Attorney General Jeff Sessions.

FACT-CHECK: ROY MOORE'S DENIALS ROY MOORE, on women who said they had a romantic relationship with him when they were in their teens: 'I do not know any of these women, nor have I ever engaged in sexual misconduct with anyone.' ''Let me state once again: I do not know any of these women, did not date any of these women and have not engaged in any sexual misconduct with anyone.' –comments during campaign stops in Henagar and Theodore, Nov. 27 and 29. THE FACTS: In at least two cases, he knew them before he didn't know them. In a Nov. 10 radio interview with Sean Hannity, Moore said he remembered two of the women, Debbie Wesson Gibson and Gloria Deason, who were 17 and 18 at the time. He said he didn't remember dating them. Asked by Hannity if he generally dated teenagers as a man in his 30s, Moore replied, 'Not generally, no. If I did, you know, I'm not going to dispute anything, but I don't remember anything like that.' Altogether, five women have stepped up to say Moore pursued them as teens. Leigh Corfman said Moore touched her sexually when she was 14; he denied that. The age of consent in Alabama is 16. Moore's campaign said he was only denying knowing women who have accused him of sexual assault. But Moore said in a campaign stop he didn't know any of the women featured in his Democratic opponent's ads. Democrat Doug Jones has run ads with the photos of all of the women who have come forward about Moore. One of the women has acknowledged that she wrote part of an entry in her high school yearbook that was initially presented as coming from Moore. But no one has refuted her claim that Moore signed her yearbook with a salutation. –Associated Press Advertisement

But Moore destroyed Strange, the appointed seat-filler, in the late September run-off, besting the incumbent by about 10 points.

The ex-judge had been aided by Bannon in the primary, whose presence relayed to voters – with a wink, wink, nudge, nudge – that Moore was the true Trump-ian pick.

When the sexual misconduct allegations came out, Bannon's people forcefully pushed back on reports that suggested the Breitbart head's support was wavering.

Over at the White House, there was some mixed messaging.

Counselor to the President Kellyanne Conway at one point said 'no Senate seat is worth more than a child,' but then changed her tune less than a week later saying that Moore's vote would be helpful on the president's tax reform bill.

White House Press Secretary Sarah Huckabee Sanders said on November 16 that, 'The president believes that these allegations are very troubling and should be taken seriously.'

'And he thinks that the people of Alabama should make the decision on who their next senator should be,' she said.

She used the latter line several more times until Trump, himself, pushed the door open to support Moore as he talked to reporters en route to Mar-a-Lago for his Thanksgiving break.

'Look he denies it ... he totally denies it,' Trump said, while also whacking the Democrat. 'We don't need a liberal person in there. ... We don't need somebody who's soft on crime like Jones.'

Last Monday, with eight days to go in the race, the president called Moore to offer him his endorsement.

Then, on Friday, Trump made his appearance in Pensacola, trying to woo Alabama voters on Moore's behalf living just over the state's line.

On Tuesday morning, the president did what he always does to encourage voters to come out – he sent out a tweet.

'The people of Alabama will do the right thing. Doug Jones is Pro-Abortion, weak on Crime, Military and Illegal Immigration, Bad for Gun Owners and Veterans and against the WALL,' Trump wrote. 'Jones is a Pelosi/Schumer Puppet.'

'Roy Moore will always vote with us. VOTE ROY MOORE!' the president said.