President Donald Trump endorsed a short-term spending bill on Friday to end the ongoing partial government shutdown.

“I am very proud to announce today that we have reached a deal to end the shutdown and reopen the government,” Trump told reporters outside the White House. “In a short while, I will sign a bill to reopen the government for three weeks until February 15. I will make sure federal employees receive their back pay very quickly or as soon as possible. It will happen fast.”

The partial government shutdown began over a dispute on border wall funding on December 22. Trump had threatened to veto spending bills that didn’t include funding for a border wall.

The Senate later failed to pass two competing bills to end the shutdown Thursday. The president on Friday then announced he was endorsing a short-term spending bill to end the shutdown and thanked government employees for their dedication and hard work.

Related: Senate Rejects Trump’s Shutdown Compromise

Trump added he had a “very powerful weapon” that he did not want to use at this time — but that it’s still in his arsenal. He has floated the idea of declaring a state of national emergency; that move could allow the president to free up billions in emergency funds for the border security wall.

“I am asking Senate Majority Leader Mitch McConnell to put this proposal on the floor immediately,” Trump said. “After 35 days of spirited debate and dialogue, I have seen and heard from enough Democrats and Republicans that they are willing to put partisanship aside, I think, and put the security of the American people first.”

Trump announced his support for the short-term spending bill with the record-long shutdown causing increased problems. Hundreds of thousands of furloughed workers missed their second paycheck, airport security has suffered personnel issues, and uncertainty had been created in the economy.

President Donald Trump issued a compromise offer to end the shutdown during a speech on January 19. Senate Republicans brought the proposed deal up in a bill that would exchange border wall funding for deportation protections that cover the immigrant group known as dreamers.

But the bill failed alongside an alternative proposal from the Democrats.

Who do you think would win the Presidency?

By completing the poll, you agree to receive emails from LifeZette, occasional offers from our partners and that you've read and agree to our privacy policy and legal statement.

Senate Democrats were instead hoping to pass a temporary spending bill to reopen the government through February 8. Their bill didn’t include funding for the border wall but instead would allow time to continue negotiating.

House Democrats already passed a bill that would temporarily fund the government through that time.

The Senate was unlikely to pass these bills since it would need 60 votes to do so, which neither side appeared to have. But it was the first major legislative move by senators to end the shutdown since it began over a month ago.

The Republican bill also was unlikely to pass the Democratic-controlled House; and the Democratic bill faced the veto threat.

Related: McConnell Announces Bill to Reopen Gov’t with Border Wall Funding

Trump had refused to sign any spending bills that didn’t include $5.7 billion for the border security wall.

“I know the pain this has caused for many Kentuckians and people across this country,” Senate Majority Leader Mitch McConnell (R-Ky.) said from the Senate floor after Trump’s White House speech. “They deserve this resolution. So going forward, I hope our Democratic friends will stay true to their commitment they stated constantly over the past weeks, that once government was reopened, they’d be perfectly willing to negotiate in good faith on a full-year government funding bill that will include a significant investment in urgently needed border security measures, including physical barriers.”

Senate Minority Leader Chuck Schumer (D-N.Y.) and Speaker of the House Nancy Pelosi (D-Calif.) had said they were unwilling to negotiate border wall funding until the shutdown was over. Trump and congressional leaders from both parties have continued discussions to overcome the stalemate throughout the shutdown. The shutdown stalemate had seemed to only become more bitter the longer it went on.

“President Trump has made numerous offers and repeatedly expressed willingness to engage with Democrats,” Freedom Caucus Chairman Mark Meadows (R-N.C.) said Friday in a statement to LifeZette. “But failure to fund needed physical barriers along our southern border is still not an option. The president is sticking by his commitment to keep our communities safe and has assured me that nothing will deter him from accomplishing that goal. His resolve remains steadfast.”

Both sides accused the other of holding furloughed government workers hostage. McConnell claimed Democrats have flip-flopped on the issue, since they used to support funding a border wall.

Trump even walked out of a meeting with Democratic leaders to resolve the shutdown on January 9.

“The president has agreed to our request to open the government and then debate border security,” said Schumer afterward. He also said he hoped that “now the president has learned his lesson.”

The dreamers are individuals who were brought into this country illegally by adults when they were only minors. They are named for the Development, Relief, and Education for Alien Minors (DREAM) Act. Former President Barack Obama provided protections for them through an executive action that established the Deferred Action for Childhood Arrivals (DACA) program.

Check out this video:

This article has been updated with the latest information.