The deal signed by Trump, and approved by Senate, will fund the US government through February 15 while negotiations continue on his demand for a border wall with Mexico.
Yielding to mounting pressure and growing disruption, President Donald Trump and congressional leaders on Friday reached a short-term deal to reopen the government for three weeks while negotiations continue over the president's demands for money to build his long-promised wall at the U.S.-Mexico border.
Trump announced the agreement to break the 35-day impasse as intensifying delays at the nation's airports and widespread disruptions brought new urgency to efforts to resolve the standoff.
"I am very proud to announce today that we have reached a deal to end the shutdown and reopen the federal government," he said from the Rose Garden.
Shortly after, the Senate approved the deal to reopen government until February 15, with the House following later Friday, according to lawmakers and aides on Capitol Hill. The legislation would include back pay for some 800,000 federal workers who have gone without paychecks.
After saying for weeks that he would not reopen the government without border wall money, Trump said he would soon sign the bill to re-open the government without additional money for his signature campaign promise.
Trump is expected to sign legislation on Friday once it passes Congress.
He said that a bipartisan committee of lawmakers would be formed to consider border spending before the new deadline.
"They are willing to put partisanship aside, I think, and put the security of the American people first," Trump said. He asserted that "barrier or walls will be an important part of the solution."
But he hinted that he was still considering taking unilateral action if efforts to come up with money for his wall fail. "I have a very powerful alternative, but I didn't want to use it at this time," he said.
Trump later reiterated he will declare a national emergency to build his US-Mexico border wall if there is no deal with Congress by mid-February.
Asked how confident he was of reaching a deal by the deadline, Trump said, "If we can't do that then ... obviously, we're going to do the emergency."
Declaring a national emergency would allow Trump to bypass Congress and use existing money to start building the wall.
Trump previously floated the idea of declaring a national emergency. But he held off, saying he wanted to pursue a deal with Congress.
A victory for Dems
Democratic congressional leaders say they hope Trump has learned a lesson that government shutdowns don't work.
Senate Democratic leader Chuck Schumer said Trump learned another important lesson after repeatedly clashing with House Speaker Nancy Pelosi during a 35-day partial government shutdown.
"No one should ever underestimate the speaker, as Donald Trump has learned," Schumer said.
Schumer and Pelosi say Democrats stayed united throughout the five-week shutdown and eventually persuaded Trump to reopen the government temporarily.
Schumer said Trump agreed to end the shutdown because "he knew that it was a lost cause."
Democrats' "unity is our power. And that is what maybe the president underestimated," Pelosi said.
Pelosi said she will discuss a date for Trump's State of the Union address once the government is open.
Trump's annual address was originally scheduled for January 29, but Pelosi cancelled it amid an impasse over the shutdown.
TRT World's Jon Brain has more.
Do 'what is right'
Overnight and into Friday, at least five Republican senators had been calling Trump, urging him to reopen the government and have the Senate consider his request for border wall money through regular legislation, according to a person familiar with the situation who was not authorised to discuss the private talks publicly.
The breakthrough came as LaGuardia Airport in New York and Newark Liberty International Airport in New Jersey both experienced at least 90-minute delays in takeoffs Friday due to the shutdown.
And the world's busiest airport — Hartsfield-Jackson Atlanta International Airport — was experiencing long security wait times, a warning sign the week before it expects 150,000 out-of-town visitors for the Super Bowl.
Trump and the Democrats in Congress had remained at odds over his demand that any compromise include money for his coveted border wall.
The standoff became so severe that, as the Senate opened with prayer, Chaplain Barry Black called on high powers in the "hour of national turmoil" to help senators do "what is right."
Senators were talking with increased urgency after Thursday's defeat of competing proposals from Trump and the Democrats.
The bipartisan talks provided a glimmer of hope that some agreement could be reached to halt the longest-ever closure of federal agencies, at least temporarily.
TRT World's Jon Brain has more on the story.
Pressure has been building among both parties to reopen agencies immediately and pay hundreds of thousands of beleaguered federal workers while bargainers hunt for a deal.
Monday is the start of federal tax filing season. But fewer than half of the furloughed IRS employees recalled during the shutdown to handle tax returns and send out refunds reported for work as of Tuesday, according to congressional and government aides. The employees had been told to work without pay.
Contributing to the pressure on lawmakers to find a solution was the harsh reality confronting 800,000 federal workers, who on Friday faced a second two-week payday with no paychecks.
In an embarrassment to Trump, a Democratic proposal to end the shutdown got two more votes in the Senate on Thursday than a GOP plan, even though Republicans control the chamber 53-47. Six Republicans backed the Democratic plan, including freshman Senator Mitt Romney, R-Utah, who's clashed periodically with the president.
The Senate first rejected a Republican plan reopening the government through September and giving Trump the $5.7 billion he's demanded for building segments of that wall, a project that he'd long promised Mexico would finance. The 50-47 vote for the measure fell 10 shy of the 60 votes needed to succeed.
Minutes later, senators voted 52-44 for a Democratic alternative that sought to open padlocked agencies through Feb. 8 with no wall money. That was eight votes short. It was aimed at giving bargainers time to seek an accord while getting paychecks to government workers who are either working without pay or being forced to stay home.
Throughout, the two sides issued mutually exclusive demands that have blocked negotiations from even starting: Trump has refused to reopen government until Congress gives him the wall money, and congressional Democrats have rejected bargaining until he reopens government.