President Donald Trump announced Friday a short-term plan that will reopen the government for three weeks so that border security negotiations may continue without the devastating effects of the partial government shutdown.

Trump said he’s prepared to sign a bill to open the government through Feb. 15. Federal employees will get back pay “very quickly or as soon as possible,” he said. Shortly after the announcement, the Senate and House both passed a resolution to reopen the government through that date.

The announcement comes on the 35th day of the longest shutdown in United States history and is a clear cave by Trump, whose impasse over the budget stems from his demands for $5.7 billion in funds for his long-promised wall along the U.S.-Mexico border ― a project Democratic lawmakers say is a firm deal-breaker.

Dem Hill source: "There is a tentative agreement between Congress and White House to do a 3-week CR+ a vehicle to go to conference to debate DHS bill / border security, with the caveat that nothing is final until the President signs it." — Jennifer Bendery (@jbendery) January 25, 2019

If funding for his border wall is not secured by the end of the negotiation period, Trump said he is prepared to shut down the government again or issue a national emergency declaration in order to get funding ― a plan that would strip funding from disaster recovery efforts.

Throughout the shutdown, Trump’s reputation has suffered across parties as airports have grappled with severe delays and federal workers have gone without paychecks, putting many at risk of losing their homes, defaulting on loans and missing other crucial payments.

Trump’s statement comes a day after the Senate failed to pass his proposal to reopen the government with border wall funding in exchange for temporary legal protection for some undocumented immigrants.

House Speaker Nancy Pelosi (D-Calif.) was in the middle of a roundtable with Capitol Hill reporters when reports began surfacing of Trump’s support for a short-term government funding bill. She was mum on whether she considered his proposal a final deal.

“We’re going in that direction but we’re not to that place,” said Pelosi. “I’m hopeful.”

Senate Minority Leader Chuck Schumer (D-N.Y.) spoke on the Senate floor shortly after Trump’s announcement, congratulating lawmakers on the development.

“The solution to this impasse was to separate funding the government from our disagreements over border security,” Schumer said, adding that “we can never hold American workers hostage again.”

Trump spent most of his speech on Friday rehashing his usual talking points about crime at the border.

“We really have no choice but to build a powerful wall or a steel barrier,” he said.

This story has been updated with more details.

Jen Bendery contributed reporting.