The attorneys general of California, New York, and 14 other states on Monday filed a lawsuit in the Ninth Circuit against the White House’s recent national emergency declaration over border security, claiming President Donald Trump has “veered the country toward a constitutional crisis of his own making.”

President Trump sarcastically had predicted the lawsuit last week.

He’s slammed the Ninth Circuit multiple times as “disgraceful” and politically biased.

The litigation, brought before a federal trial court in the Northern District of California, seeks an injunction to prevent Trump from shifting billions of dollars from military construction to the border without explicit congressional approval.

Related: Ocasio-Cortez Compares Border Wall to Berlin Wall

The suit also asks a court to declare Trump’s actions illegal, arguing that Trump showed a “flagrant disregard of fundamental separation of powers principles engrained in the United States Constitution” by violating the Constitution’s Presentment and Appropriations Clauses, which govern federal spending.

The litigation additionally includes allegations that Trump is violating the National Environmental Policy Act, by planning to build a wall that could impact the environment without first completing the necessary environmental impact reports.

The attorneys general specifically argue that the border wall does not “require[] use of the armed forces,” as mandated under 10 U.S.C. section 2808, the federal law which governs construction projects during national emergencies. Acting Defense Secretary Patrick Shanahan reportedly said this week he isn’t sure there is a military necessity at the border, or how much the agency would need to spend.

The states contend they have standing to sue the administration largely because, they allege, the federal funds could have been spent on their defense.

“Maine is aggrieved by the actions of Defendants and has standing to bring this action because of the injury to the State and its residents caused by Defendants’ reduction of federal defense spending in Maine due to diversion of funding to the border wall,” one section of the suit reads.

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.

“California is aggrieved by the actions of Defendants and has standing to bring this action because of the injury due to the loss of federal drug interdiction, counter-narcotic, and law enforcement funding to the State caused by Defendants’ diversion of funding,” reads another paragraph.

In addition to Maine, California, and New York, the group of states also includes Delaware, Oregon, Hawaii, Colorado, Connecticut, Illinois, Maryland, Michigan, Minnesota, Virginia, Nevada, New Jersey, New Mexico.

“Declaring a national emergency when one does not exist is immoral and illegal,” New York Attorney General Letitia James, who previously vowed to use “every area of the law” to investigate Trump and his family, said in a statement. “Diverting necessary funds from real emergencies, crime-fighting activities, and military construction projects usurps congressional power and will hurt Americans across the country. We will not stand for this abuse of power and will fight using every tool at our disposal.”

Related: Trump: Walls Are Border, Other Technology ‘Doesn’t Mean a Thing’

In a separate statement, California Gov. Gavin Newsom, a Democrat, remarked, “President Trump is manufacturing a crisis and declaring a made-up ‘national emergency’ in order to seize power and undermine the Constitution.”

The litigation came amid scattered anti-Trump Presidents Day protests across the country, including a group of more than a hundred demonstrators who waved signs at the White House while the president was speaking in Florida.

At a news conference outside the White House on Friday, Trump mockingly predicted legal challenges against his emergency declaration would follow a tried-and-true path.

“So the order is signed and I’ll sign the final papers as soon as I get into the Oval Office,” Trump told reporters. “And we will have a national emergency and we will then be sued, and they will sue us in the Ninth Circuit even though it shouldn’t be there, and we will possibly get a bad ruling, and then we’ll get another bad ruling, and then we’ll end up in the Supreme Court and hopefully we’ll get a fair shake and we’ll win in the Supreme Court just like the ban. They sued us in the Ninth Circuit and we lost, and then we lost in the Appellate Division, and then we went to the Supreme Court and we won.”

The Ninth Circuit Court of Appeals has jurisdiction over all appeals coming out of the Northern District of California, where Monday’s lawsuit was filed. The San Francisco-based Ninth Circuit has long been a legal stumbling block for conservative policies, and the White House has sought to appoint conservative justices to thin out the liberal ranks on the court.

Last year, Trump bypassed traditional protocols and ignored the concerns of the state’s Democratic politicians to nominate prominent conservatives to the Ninth Circuit.

Trump even engaged in a public spat with Chief Justice John Roberts on the issue, after Roberts took the unusual step of disputing Trump’s comments that the nation has biased judges on some courts. Roberts has sought to portray himself as a nonpartisan justice.

Related: Border Fight Heats Up After Trump Declares National Emergency

But Democrats have said it’s the president who defies basic legal norms.

“President Trump treats the rule of law with utter contempt,” California Attorney General Xavier Becerra said Monday. “He knows there is no border crisis, he knows his emergency declaration is unwarranted, and he admits that he will likely lose this case in court.”

In an interview, Becerra added, “Probably the best evidence is the president’s own words [when he said], ‘I didn’t need to do this, but I’d rather do it much faster.’” That was a reference to Trump’s comments on Friday.

Becerra also said Trump knew he would lose in the Ninth Circuit and wanted a “Hail Mary” win at the Supreme Court.

James, the New York attorney general, argued that the emergency declaration was not only legally unconstitutional, but also unnecessary as a practical matter, asserting that “unlawful southern border entries are at their lowest point in twenty-years, immigrants are less likely than native-born citizens to commit crimes, and illegal drugs are more likely to come through official ports of entry.”

Senior White House adviser Stephen Miller, speaking exclusively to “Fox News Sunday” anchor Chris Wallace, disputed those arguments over the weekend.

He said substantial border wall construction should be completed by September 2020 because of the emergency declaration.

“The problem with the statement that you’re ‘apprehending 80 or 90 percent of drugs at ports of entry’ — that’s like saying you apprehend most contraband at (Transportation Security Administration) checkpoints at airports,” Miller said. “You apprehend the contraband there because that’s where you have the people, the screeners. I assure you if we had screeners of that same density across every single inch and mile of the southern border, you’d have more drugs interdicted in those areas.”

In response to claims that the president was unconstitutionally taking power from Congress, Miller noted that the National Emergencies Act includes an express grant of power from the legislature to the executive branch — and also includes dispute mechanisms in case Congress disagrees with the president’s use of his authority.

“The statute, Chris, is clear on its own terms,” Miller said. “Congress has appropriated money for construction of border barriers consistently. This is part of the national security.”

Still, even a single federal judge could issue an order blocking the national emergency declaration, which has occurred nearly three dozen times so far under Trump’s watch.

The Trump administration repeatedly has condemned the increasingly common practice of one judge issuing such a sweeping order, and Associate Justice Clarence Thomas, who concurred in the high court’s decision last year to reinstate Trump’s travel ban, wrote that such injunctions “take a toll on the federal court system — preventing legal questions from percolating through the federal courts, encouraging forum shopping, and making every case a national emergency for the courts and for the executive branch.”

The stakes are high for the White House, which has struggled to see new wall funding win approval in Congress. On Friday, Trump signed a compromise spending bill that included just $1.4 billion for border security — far short of the $5.7 billion he’d requested for the wall.

The compromise legislation, which overwhelmingly passed in the House and Senate last week, contained enough funding for building just 55 miles of barricades, not the 200-plus miles the White House has sought.

Still, neither party seemed enthused about the legislation, save for its provisions averting another partial federal government shutdown.

Conservative talk radio host Rush Limbaugh, speaking to “Fox News Sunday,” called the bill “outrageous,” pointing to is provisions for what he called “welcoming centers for newly arriving illegal aliens, and all kinds of medical care” — a reference to the allocation of $192,700,000 in the bill’s conference agreement to enhance medical care and transportation for illegal immigrants in U.S. custody, including to shelters run by nonprofits.

The bill provided additional funding for 5,000 more beds that Immigration and Customs Enforcement (ICE) could use to house illegal immigrants.

But, in an attempt to pressure the agency to detain fewer illegal immigrants, Democrats ensured that the bill did not include funding for the 2,000 additional ICE agents requested by the Trump administration, or the 750 Border Patrol agents who also were sought.

By declaring an emergency, Trump is potentially able to unlock money from the Pentagon’s military construction budget, to the tune of $3.5 billion.

Several Republicans, including Texas Reps. Dan Crenshaw and Chip Roy, voted against the bill, saying it didn’t properly address the flow of illegal immigrants and drugs across the border. Roy called the bill a “sham” and said it “undermines the whole point of an emergency declaration.”

Prominent Democrats, including New York Rep. Alexandria Ocasio-Cortez and Minnesota Rep. Ilhan Omar, rejected the spending bill as well, saying it did not do enough to curb ICE.

A senior administration official told Fox News the White House planned to move $8 billion in currently appropriated or available funds toward construction of the wall. Of that, $3 billion could be diverted with help from the emergency declaration.

That money would include about $600 million from the Treasury Department’s forfeiture fund. That money has been described as “easy money” that the White House can use however it wants.

The White House also is expected to use drug interdiction money from the Defense Department.

But by declaring an emergency, Trump is potentially able to unlock money from the Pentagon’s military construction budget, to the tune of $3.5 billion.

Gregg Re is an editor for Fox News. Fox News’ Brooke Singman, Kelly Phares, Kathleen Foster and Chris Wallace contributed to this Fox News report, which is used by permission.

Read more at Fox News:
Trump ‘Should Be Removed’ Under 25th Amendment, Says Former Bush Ethics Attorney
New Details of 2016 Meeting with Trump Dossier Author Conflict with Dems’ Timeline
Tyrus Admits Defending Trump Can Be a Challenge