Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

President Donald Trump on Friday announced a short-term deal to temporarily reopen the government, ending the longest closure in U.S. history.

The stop-gap agreement with congressional leaders will last three weeks, until Feb. 15, and would allow talks to continue over border security and a wall on the southern border. The agreement includes no new money for his wall, and is a massive concession on his behalf after refusing a similar funding package a month ago.

"In a short while, I will sign a bill to reopen the government for three weeks, until Feb. 15," Trump said in the White House Rose Garden. "I will make sure that all employees receive their back pay very quickly or as soon as possible." The White House said later that workers will be paid within days.

The White House announced Friday night that the government had re-opened.

"Now that there is an agreement between the Democrats and the White House, we can make that happen," Majority Leader Sen. Mitch McConnell, R-Ky., said. The measure was passed by the Senate Friday afternoon and the House later approved it before sending it to Trump, who signed it Friday night.

"The president has agreed to our request to open the government then debate border security," Minority Leader Chuck Schumer, D-N.Y., tweeted.

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. https://t.co/lXuepIC2kJ — Chuck Schumer (@SenSchumer) January 25, 2019

At least some on the right criticized Trump for coming away from the shutdown with very little at this point.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

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

The president said he expected congressional negotiators to get him border security legislation "shortly," but he spent much of his remarks Friday touting the benefits of a wall and he threatened to use his national emergency powers if he doesn't get what he wants.

“We really have no choice but to build a powerful wall or a steel barrier," Trump said. "If we don’t get a fair deal from Congress, the government will either shut down again on Feb. 15, or I will use the powers afforded to me under the laws and the Constitution of the United States to address this emergency."

Those rarely used powers might allow the president to use money to build the wall without receiving congressional authorization.

Late Friday White House press secretary Sarah Sanders tweeted that if Democrats in Congress don't come up with wall funding in 21 days Trump "is moving forward building the wall." This suggests he would invoke emergency powers.

"The only outstanding question is whether the Democrats want something or nothing," she wrote.

McConnell called on Democrats to negotiate "in good faith on a full-year government funding (bill) that would include a significant investment in urgently needed border security measures, including physical barriers."

Trump announced the deal 35 days into the longest partial government closure in U.S. history left an estimated 800,000 federal employees without pay and created a host of problems.

On Thursday, the president said that if McConnell and Schumer were able to reach a reasonable agreement to end the shutdown, he would support it.

The shutdown began Dec. 22 and has left approximately 400,000 workers home from work without pay, while another 400,000 were required to be on the job without pay.

Trump thanked federal employees and their families in his remarks in the Rose Garden.

"I want to thank all the incredible federal workers and their amazing families who have shown such extraordinary devotion in the face of this hardship. You are fantastic people," he said. “Not only did you not complain but in many cases you encouraged me to keep going because you care so much about our country and its border."

After Democrats won control of the House in the November midterms, the president called for $5.7 billion in funding to build the border wall he had put at the heart of his presidential campaign.

Democrats refused and the acrimonious feud raged for weeks, with each side blaming the other. Trump delivered a prime-time address decrying a "growing humanitarian and security crisis" on the border, and House Speaker Rep. Nancy Pelosi postponed the president's State of the Union address citing security concerns caused by the shutdown. Trump in turn canceled a trip to Afghanistan planned by the speaker.

As the shutdown bore on, polls found that more Americans were blaming the president and his numbers began to slip.

Problems across the country have mounted over the last four weeks: Security lines at airports grew as TSA workers called out sick, and on Friday, airports across the Northeast experienced major delays as air traffic control grappled with staff shortages amid the shutdown.

Law enforcement operations also were delayed and court proceedings stalled. National Parks, museums and federally funded institutions closed their doors, too.