Late Friday night, President Donald Trump signed a bill passed by Congress that officially reopens the federal government for three weeks while lawmakers negotiate border security funding with the president — ending the longest government shutdown in U.S. history.

“I am very proud to announce today that we have reached a deal to end the shutdown and reopen the federal government,” Trump said earlier on Friday, in a surprise development that thrilled hundreds of thousands of federal workers that have been toiling without pay for more than a month. The bill passed by Congress, sources told ABC News, includes no funding for the president’s long-sought border wall. The president said earlier on Friday that while has decided not to declare a national emergency at this time, he has the ability to do so if members of Congress do not work on a deal for border security. “If we don’t get a fair deal from Congress, the government either shut down on February 15th 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 said.

Later on Friday, White House press secretary Sarah Sanders tweeted that the administration would move forward in three weeks with building a wall.

While the president has been slim on the details of the agreement, he did reference a conference committee of House and Senate leaders will act in “good faith” to reach an agreement on border security.

“Over the next 21 days, I expect both Democrats and Republicans will operate in good faith. This is an opportunity for all parties to work together for the benefit of our whole, beautiful and wonderful nation,” Trump said. The president and members of his administration have been criticized for their responses to the financial hardships faced by many federal workers missing pay. But on Friday the president specifically thanked federal workers who have endured the shutdown and said he will see to it that they receive back-pay “very quickly or as soon as possible.”

“I want to thank all of the incredible federal workers and their amazing families who have shown such extraordinary devotion in the face of this recent hardship,” Trump said. It’s unclear exactly when federal workers could begin to see their back pay, but the White House said workers should expected to be paid in the “coming days.” Over 800,000 federal workers were furloughed or worked with pay during the shutdown, forcing some to turn to food banks, charities and even put on fundraisers to make ends meet.

“Recognizing the urgency of getting Federal employees paid quickly, the administration is taking steps to ensure that they receive pay as soon as possible. Since specific payroll issues vary by agency, employees can find more information about paycheck details by reaching out to their agency,” a senior administration official told ABC News. The president of the National Treasury Employees Union Tony Reardon said checks should go out as soon as possible. “Get the checks out now. Federal employees haven’t been paid in more than a month and mortgage and rent are due next week. They shouldn’t have to wait a minute longer,” he said.

Congress has been trying to come to a deal to reopen the government, ending the longest shutdown in U.S. history. After Democrats rejected a proposal to temporarily reopen government with a pro-rated amount of border wall funding Thursday evening, Sen. Lindsey Graham told reporters Friday morning that Republican senators were looking to the White House to decide the next move.

Bipartisan talks about a possible short-term compromise – a three-week stopgap funding bill to reopen the government – began late Thursday between Senate Majority Leader Mitch McConnell and Minority Leader Chuck Schumer. Still, the president expressed optimism that a deal on border security could be reached with Democrats. “I think we have a chance, yeah. I think we have a good chance. We’ll work with the Democrats and negotiate and if we can’t do that, then we’ll do a – obviously, we’ll do the emergency because that’s what it is. It’s a national emergency,” Trump said.

CULLED FROM ABC.com