It’s starting to look as though the historic mission of Donald Trump, who was a registered member of the Democratic party as late as 2009, is to revive American liberalism. On Tuesday night, Trump, who earlier in the day had tweeted 'Roy Moore will always vote with us', accomplished his most improbable feat since winning the presidency. He helped hand over a Senate seat in Alabama, sweet home Alabama, the reddest of red states, to the Democratic candidate Doug Jones, a supporter of abortion rights and stricter gun controls. And so there was no sweetness for Trump last night. Instead, he had to eat bitterness, as the Chinese saying has it. A presidency that was already lurching unsteadily is now in danger of capsizing completely. As he bellows and rants about his enemies, the Captain Queeg of the White House may be about to face a mutiny inside his own party.

The first and most obvious danger to Trump is that he has lost the nimbus of being a winner. If Trump runs the White House as a kind of reality show, then his favoured candidate just got voted off the island—and the same could happen to Mr. Big himself. His vaunted playbook for brushing back allegations of sexual misdeeds proved none at all in Alabama. Moore, far from being able to dismiss his predilection for young lasses as FakeNews, ended up going into hiding during the last week of the elections. The rural voters, who Moore had tried to whip up with allegations of malignant Yankee outsiders coming down South to fix the election, never even bothered showing up at the polls.

Another peril for Trump is that Defcon 5 lights are now flashing for Republicans in Washington. Hitherto Trump, together with his sidekick Steve Bannon, the publisher of Breitbart News has been able to cow them into submission with his bluff and bombast about menacing them with primary challengers. And now? Republicans are likely to begin heading for the lifeboats in coming months as they seek to detach themselves from Trump. It will also be revealing to see whether or not the ideological Gleichschaltung that has been taking place in Washington at conservative citadels like Fox News and the Heritage Foundation will slow or even begin to reverse itself.

But the greatest threat that Trump faces is, of course, his own blundering. Yesterday he issued a tweet accusing New York Senator Kirsten Gillibrand, in connection with campaign donations, of being ready to 'do anything for them'. The backlash was immediate. Gillibrand, who views herself as presidential timber in 2020, instantly seized upon Trump’s objurgatory language to announce that his tweet represented a 'sexist smear attempting to silence my voice'. What Trump is beginning to discover is that a nasty tweet from him is becoming a badge of honour. But there is even more to it than that. Apart from the Russia investigation—and the triumph of Jones in Alabama means that it just got harder for him to fire Special Counsel Robert Mueller—Trump also faces a mounting effort by Democrats to investigate him for sexual misconduct.

For now, GOP losses deliver a major boost not only to the Democrats, whose donor class and base alike will be galvanised by toppling Moore, but also to Trump’s detractors inside the GOP. The NeverTrumpers—intellectual figures such as William Kristol, Peter Wehner and David Frum—can say that they were right all along about the malignancy of Trump. How easily congressional Republicans will be able to detach themselves from Trump, however, is another matter. They made a calculation that they could exploit the old boy for their ends. Even as I write, they are engaging in a last-minute revision to the tax bill that would lower the top marginal rate from 39.6 to 37 per cent, while proclaiming that their sham populism represents a bonanza for the middle-class. With an approval rating in the polls of under 30 per cent the public doesn’t appear to be buying it. Quite the contrary.