Send this page to someone via email

Democrat Doug Jones won a bitter fight for a U.S. Senate seat in deeply conservative Alabama on Tuesday, dealing a political blow to President Donald Trump in a race marked by sexual misconduct accusations against Republican candidate Roy Moore.

The stunning upset by Jones makes him the first Democrat elected to the U.S. Senate from Alabama in a quarter-century and will trim the Republicans’ already narrow Senate majority to 51-49, endangering Trump’s agenda and opening the door for Democrats to possibly retake the chamber in next year’s congressional elections.

READ MORE: Roy Moore arrives at polling station on horseback, thanks Trump for support

With 99 percent of the vote counted, Jones had a 1.5 percentage-point lead over Moore. The Republican refused to immediately concede, saying votes were still coming in and that state law would allow a recount if the margin was within half a percent.

Story continues below advertisement

WATCH: ‘It’s not over’: Roy Moore not giving up after projected loss for Alabama Senate seat

4:24 ‘It’s not over’: Roy Moore not giving up after projected loss for Alabama Senate seat ‘It’s not over’: Roy Moore not giving up after projected loss for Alabama Senate seat

The ugly campaign drew national attention and split the Republican Party over accusations from several women that Moore pursued them when they were teens and he was in his 30s.

Moore, 70, a Christian conservative who was removed from the state Supreme Court in Alabama twice for ignoring federal law, denied the allegations and said he did not know any of the women who made them. Reuters has not independently verified the allegations.

Story continues below advertisement

Trump endorsed Moore even as other party leaders in Washington walked away from him, but Jones, 63, a former federal prosecutor, portrayed the campaign as a referendum on decency and promised the state’s voters he would not embarrass them in Washington.

“I have always believed that the people of Alabama have more in common than divides us,” Jones told cheering supporters at his Birmingham victory party, where Lynyrd Skynyrd’s “Sweet Home Alabama” had earlier blasted from the speakers.

“We have shown the country the way we can be unified,” said Jones, who as a U.S. attorney prosecuted members of the Ku Klux Klan for a 1963 bombing of a Birmingham church that killed four little girls.

READ MORE: Roy Moore’s wife defends bigotry accusations, says ‘one of our attorneys is a Jew’

Jones, who cast himself as the candidate who could reach across the aisle and get things done in Washington, said Alabama had often taken the wrong road when it came to a crossroads.

“Tonight you took the right road,” Jones said.

Trump congratulates Jones

Senate Republican leader Mitch McConnell had called on Moore to drop out of the race and other Senate leaders had suggested he should eventually be expelled from the Senate if elected.

Story continues below advertisement

The sexual misconduct allegations against Moore came at a time that many powerful men, including Trump, have faced similar accusations. Democrats have promised that they will try to tie many Republican candidates in next year’s elections to Moore, and use the issue to appeal to women and suburban voters.

WATCH: Republican Roy Moore casts vote in Alabama race with high stakes for Trump

2:54 Republican Roy Moore casts vote in Alabama race with high stakes for Trump Republican Roy Moore casts vote in Alabama race with high stakes for Trump

The network exit polls found 54 percent of voters said the sexual allegations against Moore were not important to their vote, while 41 percent said they were.

Trump had recorded robo-calls to voters to bolster turnout for Moore, and held a campaign rally across the border in Florida last week. Trump’s former senior adviser, Steve Bannon, appeared at two rallies with Moore down the stretch.

READ MORE: Roy Moore joined by Steve Bannon at Alabama campaign rally

Trump tweeted his congratulations to Jones and said that “a win is a win.”

Story continues below advertisement

Congratulations to Doug Jones on a hard fought victory. The write-in votes played a very big factor, but a win is a win. The 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! — Donald J. Trump (@realDonaldTrump) December 13, 2017

Network exit polls, however, showed Trump was not a factor in the decision for about half of Alabama voters. A further 29 percent said they voted to express support for Trump, and 20 percent said they voted to oppose him.

WATCH: Roy Moore digs in heels on accusers during final rally before vote

3:25 Roy Moore digs in heels on accusers during final rally before vote Roy Moore digs in heels on accusers during final rally before vote

In Gadsden, Alabama, Louis Loveman, 73, a retired librarian and self-described lifelong Republican, said he voted for Jones. “It’s simple,” he said. “I don’t trust Roy Moore.”

“There are too many allegations floating out there for there not to be fire behind all that smoke. I never voted for a Democrat before, but I did today,” Loveman said.

READ MORE: Alabama Republicans sticking with Roy Moore despite sexual misconduct allegations

Former Democratic President Barack Obama recorded robo-calls for Jones to help turn out African-American voters, who network exit polls said constituted about 30 percent of the electorate on Tuesday.

Story continues below advertisement

Jones also supported abortion rights and opposed the repeal of Obama’s signature healthcare law, unpopular positions in the conservative state. Moore and Trump labeled Jones a liberal follower of Democratic House of Representatives leader Nancy Pelosi.