Montgomery - Democrat Doug Jones scored a stunning upset victory on Tuesday in a fiercely contested US Senate race in conservative Alabama, defeating President Donald Trump's chosen candidate who failed to overcome damaging accusations of sexual misconduct.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% of Alabama precincts reporting, Jones won 50.0% of the vote compared to Moore's 48.4%, 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," 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."'Crossroads'Alabama, which Trump won last year by 28 points, has been at a "crossroads" before, and sometimes did not take the correct path forward, Jones, 63, said.On Tuesday, "you took the right road".Trump spoke up on Twitter to congratulate Jones on his "hard fought victory"."A win is a win," 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!"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 But the Republican candidate himself refused to concede right away, declaring: "When the vote is this close, it is not over."The loss by Moore, a former chief justice of the Alabama Supreme Court, shrinks the Republicans' Senate majority to 51 in the 100-seat chamber, and reduces Trump's margin for manoeuvre to the bare minimum.By all accounts, it is a humiliating setback for Republicans as they struggle to pass 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.Dramatic upset "Tonight, Alabama voters elected a senator who'll make them proud," tweeted Hillary Clinton, Trump's defeated rival for the presidency.Tonight, Alabama voters elected a senator who'll make them proud. And if Democrats can win in Alabama, we can -- and must -- compete everywhere.Onward!— Hillary Clinton (@HillaryClinton) December 13, 2017 "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 Trump, a Democrat won the governor's race in swing state Virginia, while the party unexpectedly reclaimed several seats in that state's legislature.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 Moore assaulted, molested or pursued several teenage girls, including sexually touching one who was 14 years old at the time.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.