US President Donald Trump has defended his initial choice for the Alabama senate seat after Democrat Doug Jones won the special election in the deeply conservative state.
US President Donald Trump is defending his decision to initially back Senator Luther Strange against Roy Moore in Alabama's senate election.
"I was right!" the president said in a pre-dawn Twitter post on Wednesday, a day after Democrat Doug Jones narrowly defeated Moore, a former state Supreme Court chief justice who was buffeted by allegations of sexual misconduct.
He noted in his social media post that the reason he originally sided with Strange was that "I said Roy Moore will not be able to win the General Election."
Trump also added: "Roy worked hard but the deck was stacked against him."
The president had sent a tweet late Tuesday congratulating Jones, a former federal prosecutor, on his "hard fought victory."
Jones' victory will narrow the Senate Republican majority to 51-49. His term lasts until January 2021.
Democrat Doug Jones won a bitter fight for a US Senate seat in deeply conservative Alabama on Tuesday, US media projected, dealing a political blow to President Donald Trump in a race marked by accusations of sexual misconduct against Republican candidate Roy Moore.
The Democratic win, a political earthquake in the most contentious US election of 2017 and in one of the reddest of deep South states, marks a bitter blow to the president who gave his full endorsement to Republican Roy Moore after initial hesitations, despite the serious allegations against him.
With 99 per cent of Alabama precincts reporting, Mr Jones won 50.0 per cent of the vote compared to Mr Moore's 48.4 per cent - a margin of about 11,000 votes out of 1.1 million cast, according to figures posted by US networks including CNN.
Fox News and The New York Times also called the race for Jones.
The result puts an Alabama Democrat in the US Senate for the first time in a quarter century.
"I am truly, truly overwhelmed," Mr Jones told ecstatic supporters at his election party in Birmingham, where aides and volunteers were seen cheering and hugging.
"We have shown the country the way that we can be unified."
Alabama, which Mr Trump won last year by 28 points, has been at a "crossroads" before and sometimes did not take the correct path forward, Mr Jones, 63, said.
On Tuesday, Mr Jones said "you took the right road".
Mr Trump spoke up on Twitter to congratulate Jones on his "hard fought victory".
"A win is a win," Mr Trump said.
"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!"
But the Republican candidate himself refused to concede right away, declaring: "When the vote is this close, it is not over."
The loss by Mr Moore, a former chief justice of the Alabama Supreme Court, shrinks the Republicans' Senate majority to 51 in the 100-seat chamber and reduces Mr Trump's margin for maneuver to the bare minimum.
By all accounts, it is a humiliating setback for Republicans as they struggle to pass Mr Trump's legislative agenda through Congress and make the case that they are the responsible stewards in Washington heading into crucial 2018 mid-term elections.
"Tonight, Alabama voters elected a senator who'll make them proud," Hillary Clinton, Mr Trump's defeated rival for the presidency, tweeted.
"And if Democrats can win in Alabama, we can - and must - compete everywhere."
The race was seen as a harbinger of whether the Republican Party can retain its slim Senate majority next year.
It carries extraordinarily broad implications and serves as a test of the partisan nature of American politics at a time of acrimonious debate about Trump and his policies.
Tuesday's Democratic win is the second dramatic upset by the party in under two months.
In November, in a sweeping rebuke to Mr Trump, a Democrat won the governor's race in swing state Virginia, while the party unexpectedly reclaimed several seats in that state's legislature.
Mr Moore, 70, had wanted to bring his Christian religious activism to Washington.
But the tumultuous election was buffeted for the past month with the shock allegations by several women - first reported by The Washington Post one month ago - that Mr Moore assaulted, molested or pursued several teenage girls - including sexually touching one who was 14 years old at the time.
Mr Moore had created a major headache for Republicans. The party's leaders and members of Congress called on him to step down after the allegations first surfaced, to no avail.
Had he won, the Republican brand risked being sullied by association with the judge, particularly at a time of national upheaval over sexual harassment and the right of victims to be heard.
Moore refuses to concede defeat
Mr Moore refused to concede defeat after multiple US media outlets projected his opponent's victory.
"When the vote is this close, it is not over," Mr Moore told supporters.
"The votes are still coming in," the Christian conservative said, referring to ballots of military personnel.
"God is always in control."
Mr Moore signalled that he would call for a recount.
But Alabama law says an automatic recount is triggered only when the vote margin is within half a per cent.
With 99 per cent of all precincts reporting, Mr Jones's margin of victory was three times that at 1.5 per cent.
Alabama Secretary of State John Merrill told CNN it would be "highly unlikely" at this point a recount would change the result of the election.