Democrat Doug Jones won a bitter fight for a US Senate seat in deeply conservative Alabama on Tuesday, dealing a political blow to President Donald Trump in a race defined by sexual misconduct accusations against Republican candidate Roy Moore.
The stunning upset makes Jones the first Democrat elected to the US Senate from Alabama in a quarter-century and will trim the Republicans' already narrow Senate majority to 51-49, opening the door for Democrats to possibly retake the chamber in next year's congressional elections.
Jones, who cast himself on the campaign trail as the candidate who could reach across the aisle and get things done in Washington, is expected to take office early in January, after the results are certified.
His election was not expected to affect pending votes in Congress on funding the government or overhauling the US tax code, as Republican congressional leaders have vowed action on those bills before Christmas.
With 99 percent of the vote counted, Jones led by 1.5 percentage points over Moore, who refused to concede.
Alabama Secretary of State John Merrill said it was "highly unlikely" the outcome would change. "The people of Alabama have spoken," he told CNN.
The ugly campaign drew national attention and split the Republican Party following accusations by several women that Moore sexually assaulted or pursued them when they were teens and he was in his 30s.
Moore, 70, a Christian conservative twice removed from the state Supreme Court in Alabama for ignoring federal law, denied the allegations and said he did not know any of the women involved.
Trump endorsed Moore even as other party leaders in Washington walked away. 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.
Trump, who congratulated Jones in a tweet late Tuesday night, on Wednesday tried to cast the win in a different light.
The president had joined establishment Republicans in the primary by backing Luther Strange, who filled the seat when Jeff Sessions left to serve as Trump's attorney general. After Moore won the Republican nomination, Trump wholeheartedly endorsed Moore.
"The reason I originally endorsed Luther Strange (and his numbers went up mightily), is that I said Roy Moore will not be able to win the General Election. I was right! Roy worked hard but the deck was stacked against him!" Trump said on Twitter.
Network exit polls, however, showed Trump was not a factor in the decision for about half of Alabama voters.
"It had zero to do with Donald Trump," Republican US Representative Bradley Byrne of Alabama told MSNBC on Wednesday. The race was "a purely weird, unique election" not a harbinger of the 2018 midterm elections.
But US Senator Chris Van Hollen, who heads the Democratic Senatorial Campaign Committee, called the victory in one of the most conservative states in the nation "a political earthquake."
"You see voters who are fed up, and they want to send the message that they don't like Trumpism," Van Hollen said on MSNBC on Wednesday. "This was a big rejection of the ugly, divisive politics that Donald Trump has brought to the country."
Former President Barack Obama recorded robo-calls for Jones to help turn out African-Americans, who, according to network exit polls, constituted about 30 percent of those voting on Tuesday.
As a US attorney Jones helped win the convictions in 2001 and 2002 of members of the Ku Klux Klan for the 1963 bombing of a Birmingham church that killed four little girls.
The sexual misconduct allegations against Moore came at a time when many powerful men, including Trump, have faced similar accusations.
John Laine, 65, a retired book editor from Birmingham who backed Jones, said he thought many Republicans crossed over and voted for a Democrat for the first time in their lives.
"The reason is that people just couldn't stomach any more of Roy Moore," he said.
By Rich McKay/Reuters
Additional reporting by Andy Sullivan in Montgomery, Ala.; Writing by John Whitesides; Editing by Richard Balmforth and Jeffrey Benkoe.