“Our diversity is our strength,” Pelosi told reporters after the agreement was reached. “But our unity is our power. And that is what maybe the president underestimated.”

AD

Trump announced the deal in an early afternoon speech in the Rose Garden. By evening the Senate, and then the House, had passed the plan by voice vote, and both chambers adjourned.

AD

Trump signed the plan into law later Friday night, bringing an end to weeks of anxiety for 800,000 federal workers who will soon receive back pay after missing two consecutive paychecks. The shutdown had also threatened important government functions, impeding Food and Drug Administration safety inspections and the ability of the Internal Revenue Service to process tax refunds, and — in a final sign that it could continue no longer — causing delays Friday at major East Coast airports as unpaid air traffic controllers failed to report to work.

The deal reopens the government through Feb. 15, while also creating a bipartisan, bicameral committee charged with negotiating an agreement on border security as part of a new spending bill for the Homeland Security Department.

AD

Trump sought to cast the creation of the congressional committee as a win, and even in his moment of defeat did not let up on his demands for a southern border wall that he had repeatedly said Mexico would finance. Renewing his threats, the president insisted Congress must give him wall funding or risk another government shutdown in three weeks — or a declaration of a national emergency that would allow him to circumvent Congress and use the military to build the wall.

AD

“Let me be very clear: We really have no choice but to build a powerful wall or steel barrier. If we don’t get a fair deal from Congress, the government will either shut down 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,” Trump said at the conclusion of his lengthy remarks in the Rose Garden, during which he discussed the wall in familiar terms of crime, drugs and national security.

Democrats expressed willingness to negotiate with the president on border security issues they agree on — such as the need for improved technology — but said, as they have from the start, that there will be no money for Trump’s wall. He had been insisting on an initial payment of $5.7 billion.

AD

“Have I not been clear on the wall? No, I have been very clear on the wall,” Pelosi told reporters at a joint news conference with Senate Minority Leader Charles E. Schumer (D-N.Y.) after the deal was announced.

AD

Pelosi and Schumer took a measured tone in their comments, avoiding gloating and deflecting opportunities to declare victory over the president, even as they welcomed a deal laid out on their own terms.

“I don’t see this as any power play,” Pelosi said.

But the Democratic leaders said they hoped Trump had learned some lessons from the outcome of the first major struggle under Washington’s new power structure, with Democrats now in control of the House and Republicans still running the Senate and the White House.

AD

“No one should ever underestimate the speaker, as Donald Trump has learned,” Schumer said.

He added: “Hopefully it means a lesson learned for the White House and for many of our Republican colleagues. Shutting down the government over a policy difference is self-defeating, it accomplishes nothing but pain and suffering for the country, and incurs an enormous political cost to the party shutting it down.”

AD

On that point, Republicans agreed. The mood among Senate Republicans was sour in the wake of Trump’s announced deal, as they found themselves back where they were right before Christmas, when they voted for a short-term spending bill with no wall funding only to see Trump turn against it the next morning amid a ferocious conservative backlash. In the subsequent weeks, Republicans largely supported the president through the shutdown, incurring the wrath of some constituents and achieving nothing in the end.

AD

“This never should have happened,” Sen. Lisa Murkowski (R-Alaska) said on the Senate floor. “We cannot mess with people’s lives this way.”

“I hate government shutdowns,” Sen. Shelley Moore Capito (R-W.Va.) said brusquely to reporters as she hurried into a GOP meeting room.

Trump’s decision to reopen the government came together in only 36 hours or so, White House aides said, and a key inflection point was a revolt Thursday among some Senate Republicans — in a closed-door luncheon where they confronted Vice President Pence, and a subsequent vote where a half-dozen Republicans defied Trump to support an ultimately failed Democratic spending bill.

AD

AD

The fissures among exasperated members of his party — coupled with security concerns with the freeze on resources raised by the FBI and other agencies — led Trump to conclude he had run out of time and had to reopen the government.

Trump decided on the step Thursday. Pence and Jared Kushner, the president’s son-in-law and senior adviser, presented him with several options for doing so, and Trump opted for the three-week continuing resolution, reserving the ability to declare a national emergency if Congress does not eventually appropriate money for the border wall.

The political costs to Trump and his party could be severe, as they now command a weakened hand in a series of critical issues looming this year, including the need to raise the federal borrowing limit to stave off a crushing default.

AD

AD

Trump’s retreat caused a swift backlash from some on the right, with commentator Ann Coulter writing over Twitter: “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.”

At the same time, public disapproval of Trump has swelled five points to 58 percent over three months as a majority of Americans continue to hold him and congressional Republicans most responsible for the partial federal government shutdown, according to a new Washington Post-ABC News poll.

In addition, more than 1 in 5 Americans say they were personally inconvenienced by the ­record-long shutdown.

AD

“I’ve seen people go through fights and then take a victory lap. I’ve never seen a president go to the Rose Garden and take a defeat lap,” said Rep. Daniel Kildee (D-Mich.) “That’s what he did. This was a failure.”

AD

The shutdown also exposed fraught new divisions and weaknesses within Trump’s administration, with Commerce Secretary Wilbur Ross earning scorn for questioning earlier this week why some furloughed workers were going to food pantries, and FBI Director Christopher A. Wray decrying the shutdown’s effect on his employees in an unusual video message directed to FBI staff.

“Making some people stay home when they don’t want to, and making others show up without pay, it’s mind-boggling, it’s shortsighted and it’s unfair,” Wray said. “It takes a lot to get me angry, but I’m about as angry as I’ve been in a long, long time.”

Whether the entire nation will have to repeat the experience in three weeks remains to be seen, but House Minority Leader Kevin McCarthy (R-Calif). said he believes Trump’s threat of another shutdown is credible.

“I believe it is,” McCarthy said. “I hope calmer heads will prevail here.”