MONTGOMERY, Ala. — Democrat Doug Jones pulled off a stunning upset Tuesday in Alabama, defeating Republican Roy Moore in the race for an Alabama Senate seat and dealing a huge blow to President Trump Donald John TrumpOmar fires back at Trump over rally remarks: 'This is my country' Pelosi: Trump hurrying to fill SCOTUS seat so he can repeal ObamaCare Trump mocks Biden appearance, mask use ahead of first debate MORE in the process.

Jones is the first member of his party to win a Senate seat in the state since 1992.

With 99 percent of precincts reporting, Jones led by more than 20,000 votes.

ADVERTISEMENT

"I am truly overwhelmed," Jones told a crowd of cheering supporters in Birmingham, where he celebrated after he was projected as the winner.

Moore spoke later in the night, and refused to concede the race.

He cited an Alabama law that requires an automatic recount if the margin between the two candidates is 0.5 percent or less, though when he was speaking, Jones led by about 1.5 percent, according to the Associated Press.

“That's what we have to do, wait on god and let this process play out," Moore said. "Votes are still coming in and we are looking at that.” Alabama Secretary of State John Merrill, speaking on CNN shortly after Moore's remarks, said he did not expect the result to change, however. Asked if he expected anything other than Jones being certified as the winner, Merrill said, "No, I would find that highly unlikely to occur."

Jones’s victory over Moore comes after fellow Republicans abandoned the winner of their primary after multiple allegations surfaced that he had sexual relationships with underage girls when he was in his 30s.

The upset win by Jones means the GOP will have just a 51-49 edge in the Senate for the next year. A Democratic victory in a traditionally Republican state will also doubtlessly have GOP lawmakers in both chambers worried about next fall’s midterm elections.

ADVERTISEMENT

At the same time, the Jones victory may be somewhat of a relief to Senate Majority Leader Mitch McConnell Addison (Mitch) Mitchell McConnellPelosi: Trump hurrying to fill SCOTUS seat so he can repeal ObamaCare Senate GOP aims to confirm Trump court pick by Oct. 29: report Trump argues full Supreme Court needed to settle potential election disputes MORE (Ky.) and his fellow Republicans, who turned against Moore in droves after the sexual misconduct allegations against him became public.

Republicans were worried that Moore’s election could damage the party’s image and be used against GOP candidates next fall.

President Trump, in contrast, worked to help Moore in the campaign’s final weeks, holding a rally in Florida near the Alabama border and recording a robocall the day before the election.

Moore’s defeat is a significant loss for Trump, and for Stephen Bannon, the former White House strategist and Breitbart News chief who campaigned for him over other Republicans' objections.

Bannon’s critics wasted no time piling on him and framing his brand as toxic to the party’s chances at holding its congressional majority.

“This is a brutal reminder that candidate quality matters regardless of where you are running,” said Steven Law, who serves as the head of the Senate Leadership Fund super PAC and has emerged as one of Bannon’s chief detractors.

“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,” he added.

Jones, a former federal prosecutor, will serve out the rest of the term formerly held by Attorney General Jeff Sessions Jefferson (Jeff) Beauregard SessionsGOP set to release controversial Biden report Trump's policies on refugees are as simple as ABCs Ocasio-Cortez, Velázquez call for convention to decide Puerto Rico status MORE until January 2021.

Jones faced an uphill battle to winning the seat in Alabama, a state where Trump defeated Hillary Clinton Hillary Diane Rodham ClintonButtigieg stands in as Pence for Harris's debate practice Senate GOP sees early Supreme Court vote as political booster shot Poll: 51 percent of voters want to abolish the electoral college MORE last fall, 62 percent to 34 percent. But Democrats outpaced Republicans in turnout, a shocking display in such a red state.

Moore, a former state Supreme Court chief justice, has a loyal base of supporters who helped carry him to defeat the establishment pick for the seat, Sen. Luther Strange Luther Johnson StrangeSessions hits back at Trump days ahead of Alabama Senate runoff The biggest political upsets of the decade State 'certificate of need' laws need to go MORE, in late September.

Things changed when The Washington Post reported the first allegations against Moore in early November. The Republican’s standing in the polls plummeted and calls for him to step down echoed in Washington.

A handful of women came forward during the campaign to accuse Moore of pursuing them decades ago, while the women were teenagers and Moore was in his 30s. One accused Moore of touching her sexually while she was only 14 years old, while another accused him of sexually assaulting her when she was 16 years old.

ADVERTISEMENT

Moore has denied every allegation and called the Post story “fake news.” But Republicans in Washington, including McConnell called on him to withdraw. Some floated the idea of expelling him if he won.

A slight majority of the electorate told exit pollsters they believed the accusations, but only 7 percent said the allegations were the most important factor in their decision.

Jones’s victory appears to have been propelled by strong voter turnout among African-Americans. Early exit polls indicated that black people would make up almost 30 percent of the electorate, even though black voters typically make up 25 percent of the electorate.

His strategy in the final days focused heavily on targeting African-Americans. Jones, who gained recognition in the state for prosecuting two Ku Klux Klan members who bombed a black church in Birmingham, Ala., during the civil rights movement, campaigned with Sen. Cory Booker Cory Anthony BookerBipartisan praise pours in after Ginsburg's death DHS opens probe into allegations at Georgia ICE facility Democratic lawmakers call for an investigation into allegations of medical neglect at Georgia ICE facility MORE (D-N.J.). Former NBA superstar Charles Barkley, an Alabama native showed up for a rally on the eve of the election.

To bring moderates onto his side, Jones’s campaign blanketed the radio waves with advertisement boosting comments made by senior Alabama Sen. Richard Shelby Richard Craig ShelbySenate GOP eyes early exit Dems discussing government funding bill into February GOP short of votes on Trump's controversial Fed pick MORE (R) during a Sunday interview on CNN, where he said he would not vote for Moore. Ultimately, Jones appears to have won 52 percent of the independent vote.

The Democratic campaign undertook a historic effort to search for votes in every nook and cranny of the state — logging 1.2 million voter phone calls and knocking on 300,000 doors — an effort made more notable because of the lack of any real Democratic infrastructure statewide.

ADVERTISEMENT

State Rep. Anthony Daniels, the Democratic leader in the Alabama state House, applauded the Jones campaign’s operation in an interview with The Hill on Sunday, predicting he would outperform despite “no infrastructure on the party side.”

“Doug Jones has built the coalition that I dream for Democrats to go and make a comeback,” Daniels said.

“Voters are tired of not really getting any return on their investment from Republicans,” he said.