The US government was partially shut down at midnight on Friday after Donald Trump’s demands for border wall funding left Washington in a deadlock.

Frenetic negotiations at the Capitol, the House and Senate on Friday failed to reach a deal, sending the federal apparatus into paralysis at midnight.

Earlier in the day Trump had threatened “a very long shutdown” if his demands for billions in federal spending on a border wall with Mexico were not met. The shutdown will disrupt government operations and leave hundreds of thousands of federal workers furloughed or forced to work without pay, just days before Christmas.

It will also plunge Trump’s presidency deeper into crisis after a week that has also seen the resignation of Jim Mattis, the defense secretary, in protest against the president’s snap decision to withdraw troops from Syria as well as stocks suffering their worst week for a decade.

Mattis resignation triggered by phone call between Trump and Erdoğan Read more

As the deadline loomed, Trump’s top envoys were still straining to broker a last-minute compromise with Democrats and some of their own Republican party’s lawmakers. But as the vice-president, Mike Pence; the acting White House chief of staff, Mick Mulvaney; and Trump’s senior adviser Jared Kushner dashed back and forth at the Capitol, there were no outward signs of a deal.

Despite previously claiming that he would be “proud” to shut down the government over border security, Trump sought on Friday to blame Democrats.

“The Democrats, whose votes we need in the Senate, will probably vote against Border Security and the Wall even though they know it is DESPERATELY NEEDED,” he said in a tweet. “If the Dems vote no, there will be a shutdown that will last for a very long time. People don’t want Open Borders and Crime!”

Later, at a bill signing in the Oval Office, Trump reiterated: “Now it’s up to the Democrats as to whether or not we have a shutdown tonight. I hope we don’t, but we’re totally prepared for a very long shutdown.”

This is tyranny of talk radio hosts, right? You have two talk radio hosts who completely flipped the president Senator Bob Corker

With Democrats taking control of the House of Representatives next month, it is a critical moment for the border wall, a promise Trump made on the day he launched his election campaign in June 2015 and has repeated countless times since.

On Wednesday, there appeared to be bipartisan agreement to pass temporary spending bills keeping the government running at its current funding level through 8 February, which did not include the $5bn in federal funding Trump had demanded to build the wall.

That bill was passed, approving $1.3bn to keep several government agencies open. The White House had signaled that it was ready to accept it. But Trump reversed course after criticism from conservative allies and broadcasters such as Rush Limbaugh, and said he would not sign a bill without wall money.

Senators were aghast. Bob Corker of Tennessee told reporters: “This is tyranny of talk radio hosts, right? And so, how do you deal with that? You have two talk radio hosts who completely flipped the president. And so, do we succumb to tyranny of talk radio hosts?”

Facebook Twitter Pinterest The US Capitol is seen ahead of a possible government shutdown on 21 December. Photograph: Saul Loeb/AFP/Getty Images

On Thursday night the House passed a budget bill that includes $5.7bn to begin building the wall. But that bill was essentially dead on arrival in the Senate. The Senate began a procedural vote on the legislation on Friday afternoon, but was stuck in a long holding pattern waiting for the return of senators who had left town.

The Hawaii senator Brian Schatz, a Democrat, flew to Honolulu, only to have to turn around immediately and take a flight back to Washington. “Wheels down IAD ready to vote no on this stupid wall,” he said on Twitter Friday morning, referring to Dulles international airport, which serves Washington DC.

Sign up for the new US morning briefing

Trump tried to persuade Republicans to change Senate rules to allow the bill the pass but the idea was flatly rejected by the majority leader, Mitch McConnell.

If leaders cannot strike a deal before midnight, funding will expire for nine of the 15 cabinet-level departments and dozens of agencies. About 800,000 federal workers will either be put on leave or forced to work without pay.

Democratic leaders said they would not budge in their opposition to the border wall.

Schumer said: “The Trump temper tantrum will shut down the government, but it will not get him his wall.”

Trump, who has taken to redefining his proposed wall as steel-slatted fencing akin to much of the existing barrier, on Friday argued that a wall could do the job of sealing the border better than advanced technology.

“The Democrats are trying to belittle the concept of a Wall, calling it old fashioned. The fact is there is nothing else’s that will work, and that has been true for thousands of years,” he said in a flurry of early morning tweets.

“It’s like the wheel, there is nothing better. I know tech better than anyone, & technology … on a Border is only effective in conjunction with a Wall. Properly designed and built Walls work, and the Democrats are lying when they say they don’t.”