The shutdown is over. For now, at least.

President Donald Trump announced Friday afternoon that he and top Democrats have an agreement to reopen the government for three weeks while negotiations over his long-promised border wall between the U.S. and Mexico continue.

Trump threatened to close the  government yet again if a deal can’t be reached by Feb. 15, and also hinted he could try to bypass Congress altogether by calling a national emergency.

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

The announcement finally put an end to the record-long government shutdown that has forced 800,000 federal workers to go without their last two paychecks. The workers, who are furloughed or are working without pay, will receive back pay.

“I will make sure that all employees receive their back pay very quickly or as soon as possible,” Trump said. “It will happen fast.”

The decision allows Congress to pass spending bills the president will sign in order to restore normal operations at a number of federal agencies that have now been closed for 35 days, a full two weeks longer than the previous record-long shutdown.

The shutdown has caused massive problems at airports across the country, including the grounding of planes at LaGuardia Airport in New York on Friday morning, and matters were only going to get worse if the government had not been reopened.

During the next three weeks, a committee representing both parties will negotiate a new border security plan. If they fail to reach an agreement, the government could shutter many of its agencies yet again.

If Trump ends up calling a state of emergency, the move would surely draw legal challenges, tying things up in court, potentially for years.

[totalpoll id=”8280″]