Donald Trump had hoped to mark his first anniversary as president basking in surprisingly positive media headlines and enjoying a lavish party at his Mar-a-Largo estate in Florida. Instead he must contend with a government shutdown and another major political crisis in Washington, the political swamp he promised to drain. Congress has remained in session all weekend as Republicans and Democrats seek to resolve the shutdown — and blame each other for having caused it.

But who will Americans blame? The President? The Republican Party? Or the Democrats? The answer is everybody, probably. President Trump has taken a hardline with the Democrats, seemingly convinced that he can pin them for their intransigence on his immigration proposals — or as he puts it, prioritising illegal immigrants over American citizens.

It could be smart brinksmanship from Trump. He has proved already that the American public is more in tune with him on border control than it is with the political class. He could be right again.

The shutdown hits Trump where it really hurts, however — it brings into question his ability to cut deals and always win. He can blame the Democrats all he wants, and Republicans will agree with him, but if he can’t untangle the mess,  the failure of leadership will ultimately be his. In 2013, as a maverick businessman celebrity who dabbled in politics, Trump enjoyed lambasting President Obama for his weak leadership in not preventing a shutdown in 2013.

This weekend his presidency, for all its radical unusualness, looks more than a little like Obama’s: the Commander-in-Chief with a powerful public image who can’t get enough done or prevent paralysis in DC, and who blames Congress for stymying his attempts to put the country on the right path.

The Democrats say that Trump has played false with them — at times signalling his intent to compromise over DACA, the Obama-era scheme that grants work permits to undocumented immigrants who came to the US as children, and at other times refusing compromise. Trump’s chief-of-staff John F Kelly and other advisers have reportedly pushed Trump into taking the hardest possible line. Senator Chuck Schumer, the top Senate Democrat, has said he was led to believe a deal was in the offing after lunch at the White House on Friday, but that was quickly withdrawn.”Negotiating with President Trump is like negotiating with Jell-O,” Schumer said. “It’s next to impossible.” But then Schumer’s not an altogether reliable source.

President Trump, as Obama did to the Republicans before him, will be able to use his bigger media profile to keep repeating the message that the opposition party are cynically blocking his way forward. Obama blamed it on the GOP’s fanatical hatred of government. Trump says it is the Democrats fanatical attachment to illegal immigration. But as Obama found, blaming the Democrats will only buy Trump and his party some leeway, which will vanish if and as the crisis intensifies.

The Republicans will be rightly castigated — after all, they control both houses and the White House, yet have been unable to push through a solution. Trump might be able to shout ‘it’s your fault’ loudest, but if his brinksmanship fails — if the machinery of the state, border security and parts of the military start to freeze because there is no federal money, he and the Republicans will pay the political price in the mid-terms in November.