President Trump on Tuesday ridiculed California for its “failed Fast Train project” as he fired back at a multi-state lawsuit opposing his declaration of a national emergency on the southern border.

"As I predicted, 16 states, led mostly by Open Border Democrats and the Radical Left, have filed a lawsuit in, of course, the 9th Circuit! California, the state that has wasted billions of dollars on their out of control Fast Train, with no hope of completion, seems in charge!" he tweeted.

NEW YORK, CALIFORNIA, 14 OTHER STATES SUE TRUMP IN NINTH CIRCUIT OVER EMERGENCY DECLARATION

Trump was referring both to the lawsuit and to California’s high-speed rail project from Los Angeles to San Francisco, which was canceled last week amid delays and cost overruns. The $77 billion project would dwarf the cost of a wall at the border -- estimated to be $20-25 billion.

“The failed Fast Train project in California, where the cost overruns are becoming world record setting, is hundreds of times more expensive than the desperately needed Wall!” he tweeted.

The lawsuit, filed Monday by attorneys general of California, New York and 14 other states in the Ninth Circuit, challenges Trump’s announcement on Friday declaring a national emergency over border security -- a move that allows him to potentially access more funds for the proposed wall on the southern border.

The lawsuit seeks an injunction to prevent Trump from shifting billions of dollars from military construction to the border without explicit congressional approval. 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 also 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.

HILLARY CLINTON SLAMS TRUMP'S NATIONAL EMERGENCY DECLARATION IN TWEET

"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."

Trump had previously predicted that opposition to his declaration would come through the Ninth Circuit, a court he has had issues with before. The San Francisco-based 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.

CLICK HERE TO GET THE FOX NEWS APP

Trump announced his decision to declare a national emergency on Friday after a compromise spending bill to keep the government open gave only $1.4 billion for barriers, and that money came with strings attached about where it could be used and on what barriers. It was well short of the $5.7 billion Trump had demanded.

A senior administration official told Fox News the White House is planning to move $8 billion in funds toward the wall, $3 billion of which would be diverted with help from the emergency declaration.

Fox News' Gregg Re, John Roberts and Barnini Chakraborty contributed to this report.