Updated at 8:28 p.m.: Revised with President Trump signing the three-week spending deal to end the shutdown.

WASHINGTON — President Donald Trump agreed Friday to end the five-week government shutdown, signing legislation Friday night to reopen government for three weeks in a deal that includes none of the border wall funding he had demanded.

The president announced the deal from the Rose Garden, where he threatened to invoke emergency powers to move ahead with wall construction if lawmakers don't provide funds by Feb. 15. The Senate and House each approved the deal by voice vote Friday night, and the White House announced at 8:23 p.m. that he had signed it.

The deal will bring relief to 800,000 federal workers who missed their second paychecks Friday.

Many of those workers have been required to work for more than a month, without pay, including air traffic controllers, prison guards, food safety inspectors and the FBI agents who raided the home of Trump's longtime political fixer, Roger Stone, on Friday morning.

Widespread absenteeism by Transportation Security Administration officers had slowed passengers at airports. Shortages of air traffic controllers on Friday prompted the FAA to delay flights at New York's LaGuardia and other airports.

Trump had insisted on $5.7 billion for a border wall. He vowed before the shutdown began Dec. 22, and throughout the standoff, that he would not sign any spending measure, long-term or temporary, unless it delivered on the wall he had long promised voters. Democrats cast his retreat as a major defeat, as did some conservatives who had prodded Trump to dig in.

"We really have no choice but to build a powerful wall or steel barrier," Trump said Friday. "If we don't get a fair deal from Congress, the government will either shut down on Feb. 15, 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's authority to shift funds from Pentagon or other accounts is in dispute. Democrats and many Republicans dispute his assertion that the situation at the border is a crisis, and with Friday's deal, he didn't get funding for a wall.

The Democrats won the House majority in November. The new speaker, Nancy Pelosi, called the wall "immoral," refused to budge and so far has outmaneuvered Trump.

Friday night, she named Laredo Rep. Henry Cuellar, a staunch opponent of the wall, as one of the half dozen House Democrats on the conference committee assigned to hammer out a border security plan in the next three weeks.

"Democrats ... support strong, smart, and effective border security solutions instead of wasting billions of taxpayer dollars on an ineffective wall," Cuellar said.

Sen. Tester: “He shut it down. Was it worth it? It’s the most stupid shutdown I’ve ever seen in my life”



“He should go back to school and find out what civics is about and find out if you don’t have the votes you don’t shut the government down” — Burgess Everett (@burgessev) January 25, 2019

A question many will ask. https://t.co/aGIQNNNl6J — Matt Mackowiak (@MattMackowiak) January 25, 2019

Swift reaction

Criticism came fast from across the political spectrum. Montana Sen. Jon Tester, a moderate Democrat, called it "the most stupid shutdown I've ever seen in my life."

Trump shrugs off sniping from the left but has often responded to needling from Fox News pundits and conservative commentators such as Ann Coulter, who issued a scathing condemnation by calling him "the biggest wimp ever to serve as president."

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. — Ann Coulter (@AnnCoulter) January 25, 2019

Rep. Will Hurd of San Antonio, the most outspoken Republican critic of a border wall, had condemned Trump's tactics and lauded the end to the shutdown. "We should never negotiate on the backs of hundreds of thousands of federal employees working without pay," he tweeted.

Freshman Rep. Colin Allred, a Dallas Democrat, said: "This is long overdue, but I am glad the president has come to the table and agreed to open the government."

Late Friday, after reiterating his threat to build the wall by declaring a national emergency, Trump insisted that "this was in no way a concession."

I wish people would read or listen to my words on the Border Wall. 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! — Donald J. Trump (@realDonaldTrump) January 26, 2019

I’m glad to see the government reopen. We should never negotiate on the backs of hundreds of thousands of federal employees working without pay. — Rep. Will Hurd (@HurdOnTheHill) January 25, 2019

At the American Federation of Government Employees, a union representing 700,000 federal workers, president David Cox said that "while reopening the government is long overdue, I will not celebrate a temporary reprieve to a politically motivated crisis that has left many federal employees in anguish over how to pay their bills, feed their families, and keep a roof over their heads."

Republicans sought to shift blame for the shutdown to Democrats.

"I am glad the Schumer shutdown is over," Texas Sen. Ted Cruz said in a statement, referring to Senate Democratic leader Chuck Schumer. "I am glad federal workers will finally be paid. For weeks, Democrats held their paychecks hostage.

"The Democrats have claimed that, once the shutdown ends, they are willing to negotiate in good faith to secure the border," he said. "Given their behavior, there is considerable reason to be skeptical of their claim. But, now, we will see if they actually meant what they said."

Rep. Michael Burgess, R-Pilot Point, a vocal defender of the wall, labeled the government disruption the "Democrats' senseless shutdown."

"President Trump has proven that he values the well-being of the American people over petty politics," Burgess said. "Government shutdowns are wrong."

Trump's case for a wall

Trump, after accepting roughly the same terms Congress offered more than five weeks ago, reiterated his case for a border wall, expressing hope that lawmakers will hammer out an acceptable plan in the next three weeks to bolster border security.

"Walls should not be controversial," he said. "Our country has built 654 miles of barrier over the last 15 years. ... No matter where they go, they work."

He distanced himself from the vision of a massive opaque barrier that he pitched to voters, a vision that critics find offensive and wasteful.

"We do not need a 2,000 miles of concrete wall from sea to shining sea. We never did. We never proposed that," he said.

Pelosi said it shouldn't have taken so long to reach an end to the shutdown.

"It's sad ... that it's taken this long to come to an obvious conclusion," she said at the Capitol. "We cannot hold our public employees hostage because we have a disagreement."

The State of the Union address originally scheduled for Tuesday night remained on hold, she said.

Negotiators from both parties and from the House and Senate will work on a border security plan in the next three weeks, but asked if those talks might lead to wall funding, Pelosi said: "Have I not been clear about a wall?"

The GOP-run Senate had voted Thursday on two plans. One, backed by the White House, included wall funding. The other would have reopened government for three weeks without that funding. Trump opposed that. Both votes fell short.

Like most Senate Republicans, Texas' John Cornyn and Cruz supported the Trump-favored version and opposed the other.

Senate Majority Leader Mitch McConnell faced growing backlash from fellow Republicans as the standoff persisted. He refused for weeks to hold a vote on any measure to reopen the government on grounds that Trump wouldn't sign it, providing political cover to the president even as public anger swelled amid stories of government workers turning to food banks and food stamps and moonlighting as Uber drivers.

Vice President Mike Pence got an "earful" at a lunch Thursday with GOP senators, Cornyn recounted afterward.

"We're all hearing from our constituents who are working for no pay," Cornyn told reporters. "And there's a parade of horribles of how people who are having to cope with not getting paid, and it's not good. ... There was a lot of frustration expressed about the situation we find ourselves in."

Democrats had ramped up pressure on Trump and GOP allies in Congress. The party's House campaign arm unleashed an ad blitz against 25 potentially vulnerable lawmakers on Friday. Among them were five Texans, including Rep. Kenny Marchant of Coppell.

"A three-week funding bill is not the ideal solution to this shutdown," Marchant said Friday afternoon. "If it is the only way to bring Democrats to the table, then I hope the end result is a strong bill that finally provides the full funding needed to secure our border."

A Washington Post-ABC News poll released Friday showed that Trump's disapproval ratings have spiked 5 percentage points in the last three months, hitting 58 percent.

The poll found the public overwhelmingly blames Trump and Republicans more than Democrats for the shutdown.

Trump made it harder to shift blame. Before the shutdown began, he declared in an Oval Office meeting with Pelosi and Schumer, with news media on hand, that he would take full blame for any shutdown because it was worth it to pry wall funding from Congress.

Trump had made the project a central campaign promise, though during his first two years as president, when Republicans controlled both the House and Senate, he never took such dramatic steps as he did once his party lost the House.

Although he had promised that Mexico would pay for the wall, the administration has never proposed any funding mechanism other than paying out of general revenue, which comes from U.S. taxpayers.

Washington correspondent Tom Benning contributed to this report.