Updated

Both chambers of Congress passed the short-term spending bill to re-open the government, temporarily ending the 35-day partial government shutdown on Friday, sending the measure to President Trump’s desk for him to sign into law.

Trump and congressional Democrats arrived at an agreement Friday to support a short-term spending bill to re-open the government, temporarily ending the partial government shutdown that has dragged on for 35 days, in a move to separate the controversial issue of border security from funding of the government.

From the White House Rose Garden Friday, the president announced that the administration and Congressional Republicans and Democrats had “reached a deal to end the shutdown and reopen the federal government." Trump said the deal would keep the government open for three weeks until Feb. 15. The measure passed the Senate on Friday afternoon on a voice vote. It passed the House of Representatives via unanimous consent later Friday, and Trump is expected to sign it tonight.

PARTIAL GOVERNMENT SHUTDOWN TIMELINE: FROM TRUMP'S DEMANDS TO DEMOCRATS' PROPOSALS

“I am very proud to announce we have reached a deal to end the shutdown and reopen the federal government,” he said to applause from gathered Cabinet members.

The government ran out of funding on Dec. 22, amid a border security debate between the White House and congressional Democrats. The president requested $5.7 billion in funding for border security and construction of a steel barrier or concrete wall along the U.S.-Mexico border, but Democrats vowed to block any spending package that included any sort of funding for the wall.

Trump, who just this week vowed that Republicans would not “cave” on his demands for funding for a wall on the Southern border, ultimately arrived at an agreement with Democrats to support a measure to re-open the government, and negotiate a plan for border security separately. The deal does not include funding for a wall or barrier along the border, but Trump said he was confident negotiations would continue to come to an agreement on wall funding.

Trump made reference to his previous threats to declare a national emergency to secure the border, calling it a “very powerful weapon," and noted that if no deal was reached to fund border security and construction of a wall before Feb. 15, the next date the government's funding would run out, he would use his presidential powers to declare an emergency.

“Walls should not be controversial,” he said. “As commander-in-chief, my highest priority is the defense of our great country.”

He added: “We cannot surrender operational control over our nation’s borders to foreign cartels, traffickers and smugglers.”

Meanwhile, Senate Minority Leader Chuck Schumer, D-N.Y., said Friday in a joint press conference with House Speaker Nancy Pelosi, D-Calif., that the measure will pass in both the House and the Senate, and expects the president to sign the legislation late Friday.

“The solution to this impasse was to separate funding for the government and border security,” Schumer said on Capitol Hill Friday after the president’s announcement. “Democrats in the Senate and House were united on this position throughout the shutdown.”

Senate Majority Leader Mitch McConnell, R-Ky., said on the Senate floor that he supports the president's plan to re-open the government and called on Democrats to come to the table and negotiate a border security plan before Feb. 15.

“Going forward, I hope Democrats will stay true to the commitment they have stated constantly over the past weeks – that once government was re-opened, they would be perfectly willing to negotiate in good faith on full-year government funding that would include a significant investment in urgently needed border security measures, including physical barriers," he said.

Later, Trump told reporters at the White House that he planned to "work with Democrats" on a border security package.

"If we can't do that, then, obviously, we'll do the emergency, because that's what this is-- a national emergency," Trump told reporters at the White House Friday afternoon.

The shutdown left more than 800,000 federal workers and contractors without pay. Some federal employees were deemed essential to government function and were forced to work without receiving paychecks. Other employees were furloughed, and also did not get paid.

Trump on Friday said back pay for federal employees would occur "very quickly," but did not give a specific timeline.

"Recognizing the urgency of getting Federal employees paid quickly, the administration is taking steps to ensure that they receive pay as soon as possible," a senior administration official told Fox News Friday. "Since specific payroll issues vary by agency, employees can find more information about paycheck details by reaching out to their agency."

The government shutdown brought heated rhetoric and action on both sides of the aisle—with Trump canceling a Democratic congressional trip to Afghanistan after Pelosi called on him to delay his State of the Union address, slated for Jan. 29. Trump announced Thursday he would delay the address, but as the government is on track to re-open by the end of the day Friday, the annual address could take place next Tuesday as previously scheduled.

Over the weekend, though, Trump announced a compromise plan that funded the wall while extending protections for 700,000 illegal immigrants brought to the country as children under the Obama-era Deferred Action for Childhood Arrivals (DACA) program and 300,000 immigrants from countries designated unsafe to return.

CLICK HERE TO GET THE FOX NEWS APP 

But Democrats, who long argued protections for DACA recipients were critical, opposed Trump’s proposal. The Senate this week attempted to pass a measure with DACA protections included but failed to get the 60 votes needed to pass.

Fox News’ John Roberts, Blake Burman, Mike Emanuel, Chad Pergram, and Alex Pappas contributed to this report.