President Donald Trump declared a national emergency along the southern border on Friday while preparing to sign a budget deal that falls far short of his requests.

Trump has been working to get funding for a border wall in a political fight that caused a partial government shutdown earlier and threatened another.

He is preparing to sign a proposal into law that would prevent another shutdown and fund some border security.

But since he was dissatisfied with those border security investments, he also moved to declare a state of emergency to free up more funds.

“The order is signed and I’ll sign the final papers once I get back to the Oval Office,” Trump said during a press conference at the White House on Friday morning in which he strongly advocated for his point of view.

“We will have a national emergency and then we’ll be sued, and they’ll probably sue us in the Ninth Circuit, even though it shouldn’t be there, and we’ll possibly get a bad ruling, and then we’ll get another bad ruling — and then we’ll end up at the Supreme Court and hopefully we’ll get a fair shake and win.”

Trump has discussed the possibility of a national emergency along the southern border during several recent press conferences and meetings.

The move could possibly allow the president to free up billions in emergency funds for his wall from various federal reserves through the National Emergencies Act. But it would also lead the administration into unknown legal territory and likely result in lawsuits.

Related: Border Compromise Passes and Now Heads to Trump for His Signature

“I’m going to be signing a national emergency and it has been signed many times before,” Trump said early on in the press conference. “There has rarely been a problem. They sign it and nobody cares. I guess they weren’t very exciting. But nobody cares and they sign it for far less important things in some cases, in many cases. We’re talking about an invasion of our country with drugs and human traffickers, with all types of criminals and gangs.”

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.

Congress passed the National Emergencies Act in 1976 — and since that time, American presidents have declared at least 58 states of emergency, as USA Today pointed out. This does not include disaster declarations for weather events, according to the nonpartisan Brennan Center for Justice. Dozens of emergencies remain in effect; they were extended by subsequent presidents.

The budget compromise from Congress this week includes $22.54 billion in total border security funding, with $1.375 billion of that going to 55 miles of physical barriers along the southwest border.

Trump has been fighting to get a lot more money — $5.7 billion — for the southern border wall project.

The proposal also funds the remaining parts of the federal government through the fiscal year to September 30.

“The budget deal is a down payment on the wall, provides funding for more immigration judges, and does not include a cap on detention beds for violent illegal immigrant offenders,” Sen. Lindsey Graham (R-S.C.) said in an earlier statement on Thursday, as provided to LifeZette. “It’s now time for President Trump to use executive powers, including declaring a national emergency, to build the wall. I stand firmly behind President Trump’s decision to use executive powers.”

Trump started entertaining the idea of declaring a state of emergency to get the funds for a border wall during the recent government shutdown.

He further stoked speculation since, but maintained for a while that he wanted to see if lawmakers could come to a deal on their own first. But the one they came up and passed this week did not reach his expectations.

Speaker of the House Nancy Pelosi (D-Calif.) and Senate Minority Leader Chuck Schumer (D-N.Y.) have been leading the charge against the president and the border wall. The two called the move a lawless act and that the situation on the border isn’t a crisis.

They also accused the president of fear-mongering.

“Declaring a national emergency would be a lawless act, a gross abuse of the power of the presidency and a desperate attempt to distract from the fact that President Trump broke his core promise to have Mexico pay for his wall,” the Democratic leaders said in a joint statement on Thursday. “It is yet another demonstration of President Trump’s naked contempt for the rule of law.”

Pelosi soon afterward addressed the matter during a press conference. She said on Thursday that a legal challenge might be possible from her party but at the moment they are reviewing all their options. She also argued that the situation on the border doesn’t qualify as an emergency and that the president is simply trying to supersede Congress.

Related: Senate Passes Budget Compromise in Hopes of Avoiding Shutdown

“Trump’s vanity project is not a national emergency,” Leadership Conference on Civil and Human Rights president Vanita Gupta said in a statement on Thursday. “Congress has repeatedly rejected his call to waste taxpayer dollars on a southern border wall to respond to a so-called and non-existent crisis. His declaration is an abuse of power, an attempt to end run the Congress, and will not stand.”

Trump was urged by lawmakers in both parties to consider the budget proposal to avoid another shutdown.

Senate Majority Leader Mitch McConnell (R-Ky.) said the deal wasn’t perfect but called it a step in the right direction on the floor before the proposal passed on Thursday and during an earlier press conference.

Trump has argued numerous times the situation at the border constitutes a crisis and that a wall is critical to deterring illegal drugs and criminal gangs from coming into this country.

The Federation for American Immigration Reform (FAIR) released a recent study on showing that illegal aliens are incarcerated at three times the rate of legal residents.

Trump has also faced several migrant caravans over the past year that have sometimes included thousands of people, with many seeking asylum. But the surge of migrants has caused tensions along the southern border and has worsened the already contentious policy dispute among lawmakers.

He mentioned moments before declaring the national emergency that two new incoming caravans were already broken up with help from Mexico.

Be sure to check out this video: