Just one day after signing a bill to reopen the government for three weeks after the longest shutdown in history, Donald Trump is already anticipating another one.

Submitting to mounting pressure, Mr Trump backed down from his demand that Congress give him money for his border wall before federal agencies go back to work, but said if no deal is reached by February 15 the stand-off will resume once again.

“21 days goes very quickly,” Mr Trump tweeted on Saturday.

“Negotiations with Democrats will start immediately. Will not be easy to make a deal, both parties very dug in. The case for National Security has been greatly enhanced by what has been happening at the Border & through dialogue. We will build the Wall!”

Announcing his decision on Friday to sign legislation funding shuttered agencies until February 15, Mr Trump denied he was capitulating to the Democrats.

“This was in no way a concession. It was taking care of millions of people who were getting badly hurt by the Shutdown with the understanding that in 21 days, if no deal is done, it’s off to the races!”

It came as S&P Global Ratings agency reported that the US economy lost $US6 billion during the 35-day shutdown.

The economic hit stems from a loss of productivity and and economic activity lost to outside business during the shutdown.

“Although this shutdown has ended, little agreement on Capitol Hill will likely weigh on business confidence and financial market sentiments,” S&P said.

The shutdown ended as Democratic leaders had insisted it must — reopen the government first, then talk border security.

The deal he reached with congressional leaders contains no new money for the wall but ends the longest shutdown in US history.

First the Senate, then the House swiftly and unanimously approved the deal. Late on Friday, Mr Trump signed it into law. The administration asked federal department heads to reopen offices in a “prompt and orderly manner” and said furloughed employees can return to work.

Mr Trump’s retreat came as intensifying delays at the nation’s airports and another missed payday for hundreds of thousands of federal workers brought new urgency to efforts to resolve the standoff.

“The president thought he could crack Democrats, and he didn’t, and I hope it’s a lesson for him,” said the Senate Democratic leader, Chuck Schumer.

House Speaker Nancy Pelosi said of her members: “Our unity is our power. And that is what maybe the president underestimated.”

As negotiations restart, Mr Trump enters them from a weakened position. A strong majority of Americans blamed him for the standoff and rejected his arguments for a border wall, recent polls show.

“If we don’t get a fair deal from Congress, the government will either shut down on February 15, again, or I will use the powers afforded to me under the laws and Constitution of the United States to address this emergency,” Mr Trump said.

The president has said he could declare a national emergency to fund the border wall unilaterally if Congress doesn’t provide the money. Such a move would almost certainly face legal hurdles.