In a sudden change of course, President Trump on Friday announced an agreement to temporarily end the 35-day government shutdown that does not include the $5.7 billion he demanded for his border wall.

Negotiations on funding for border security will continue until Feb. 15, a reversal for the president, who had repeatedly insisted he would keep the government closed until Congress came across with the cash he wanted.

“I am very proud to announce today that we have reached a deal to end the shutdown and reopen the federal government,” Trump said during a news conference in the Rose Garden.

He added that he had “a very powerful tool” that he could use, presumably referring to his earlier declaration that he could declare a national emergency, if Congress did not meet his demands over the next three weeks.

He also thanked the 800,000 federal workers who endured the shutdown, insisting that most supported his position on border security, and said that they would be given back pay quickly.

He predicted that he and lawmakers would be able to cut a deal, which would include “barriers or walls” as part of the solution.

The announcement came as a shortage of air traffic controllers caused widespread flight delays, putting intense pressure on the White House to end the stalemate.

“This is getting worse and worse. He knows this has to end,” an administration official told CNN.

The president did not offer any explanation for his sudden about-face, but instead delivered his standard immigration speech, replete with dire warnings about smuggled drugs, crime, gangs and women bound with duck tape being smuggled by human traffickers.

And he warned that he would shut the government down again or declare a national emergency if Democrats don’t agree to his border security demands.

“If we don’t get a fair deal from Congress, the government will either shutdown on February 15th again or I will use the powers afforded to me under the laws and the Constitution of the United States to address this emergency. We will have great security,” he concluded before leaving the podium without taking questions.

Both Senate Majority Leader Mitch McConnell and Minority Leader Chuck Schumer celebrated the temporary end to the shutdown on Twitter.

“I was glad to see today the president’s announcement that he and Democrats have reached an agreement that will immediately re-open the government, while providing the room to negotiate a funding bill for the Department of Homeland Security,” McConnell wrote.

“The longest shutdown in American history will finally end. The president has agreed to our request to open the government then debate border security. This is great news for 800,000 federal workers & millions of Americans who depend on government services,” Schumer tweeted.

But not everyone was happy — including caustic conservative pundit Ann Coulter.

“Good news for George Herbert Walker Bush: As of today, he is no longer the biggest wimp ever to serve as President of the United States,” she tweeted.