WASHINGTON - President Donald Trump faced a new, more perilous political reality Wednesday, after a stunning Democratic victory at the polls in America’s deeply conservative south threw the depth and breadth of his support into serious doubt.

Doug Jones’ win in a special Senate race in Alabama - the first such Democratic win in a quarter-century - cut the Republican majority in the Senate to 51-49, making it more difficult for an already struggling Trump to get legislation through Congress. The finger of blame turned squarely to Roy Moore, the Republican candidate who ran on an openly bigoted message, was plagued by allegations of sexual misconduct with teenage girls and ignored party calls to drop out.

Sensing the gathering storm, Trump tried to absolve himself of any blame.

“Roy worked hard but the deck was stacked against him!” Trump tweeted, reminding Americans that Moore was not his first choice in the race. He had endorsed another candidate in the party primary.

But as the broader political autopsy commenced, Trump’s role in the race and the implications for his presidency came under the microscope.

Trump ignored the advice of party leaders when he threw his weight behind the 70-year-old Moore, seeing the former Alabama Supreme Court chief justice as something of a kindred political spirit.

Like Trump, Moore had sought to win through a coalition of evangelical and white voters, betting that bedrock of support would be enough - and would provide a shock absorber to any political scandal.

Moore - who received advice from Trump’s former chief strategist Steve Bannon - also borrowed liberally from Trump’s campaign, reveling in racially charged statements and constant attacks on the press and other “elites.”

Traditional Republicans saw the vote as a turning point in the bitter battle for the soul of Trump’s party.

“What a relief,” said one Republican party operative who, like many in the “establishment,” had feared Moore would come to define the party had he won.

Congressman Peter King took aim at Bannon directly.

“It’s not the type of person we need in American politics,” the Republican lawmaker told CNN. “He looks like a drunk that wandered onto the national stage.”

But some in Trump’s inner circle now wonder whether Alabama shows the limits of his approach: If it does not work in deep red Alabama , where can it work?

The question is one that the White House will have to solve urgently. Next year sees mid-term legislative elections that offer Democrats a chance to regain control of both chambers of Congress.

For months, Republican donors have voiced concerns that the party may lose control of the House of Representatives.

After the upset in Alabama , even the Senate may be in play.

“It opens the door to an unlikely Democratic Senate takeover next year,” said Kyle Kondik and Geoffrey Skelley of the University of Virginia’s politics department.

Keeping control of both houses is key to Trump passing his agenda - and avoiding moves toward his own impeachment. With an approval rating of 35 percent, Trump has faced one controversy after another during his 11 months in office.

Normally cautious paper USA Today all but called for Trump resign, after he suggested a female senator would do “anything” for campaign contributions.

“A president who’d all but call a senator a whore is unfit to clean toilets in Obama’s presidential library or to shine George W. Bush’s shoes” the paper wrote in a searing editorial.

With 100 percent of Alabama precincts reporting, Jones won 49.9 percent of the vote compared to Moore’s 48.4 percent, a margin of nearly 21,000 votes out of 1.3 million cast, according to figures posted by US media.

Jones, 63, is a former federal prosecutor who shot to local prominence when he convicted members of the Ku Klux Klan who bombed a black church in the 1960s, killing four girls.

“We have shown the country the way that we can be unified,” Jones told ecstatic supporters at his election night party in Birmingham.

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 said. “You took the right road,” he said.

Moore however refused to concede, declaring: “When the vote is this close, it is not over.”

He signalled he wanted a recount, but Alabama law only provides for an automatic recount if the margin is within half a percentage point. The current margin stands at 1.5 percent.

Alabama officials will certify the vote between December 26 and January 3. If no recount is ordered, Jones is expected to be seated in the US Senate in early January.

The Democratic National Committee said Moore’s loss in the conservative heartland sent a “loud and clear” message to Trump and his Republicans.

“You can’t call yourself the party of family values as long as you’re willing to accept vile men like Roy Moore as members,” DNC chairman Tom Perez said.

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.