President Donald Trump attacked California and its plans for a high-speed train on Tuesday as he responded to a 16-state coalition's lawsuit challenging his national emergency declaration.

"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!" Trump tweeted.

Trump zeroed in on California, which is leading the group alleging that the president's emergency declaration is unconstitutional.

"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!" Trump tweeted.

The "Fast Train" Trump mentions refers to California's attempts to construct a high-speed rail project that would have ferried commuters between San Francisco and Los Angeles. According to the Associated Press, costs for the project have doubled to $77 billion and the anticipated date for the rail project to be completed has been pushed back 13 years to 2033.

California's Democratic Gov. Gavin Newsom has sparred with Trump over federal funding for the project, and has said efforts will be focused on finishing construction in the Central Valley, rather than the original plan that "would cost too much and take too long," Newsom said in his State of the State address last week.

"President Trump, keep talking ... we continue to gather evidence to support our lawsuit against you," California's Democratic Attorney General Xavier Becerra tweeted Tuesday in response to Trump.

Taking questions in the Oval Office on Tuesday afternoon, Trump said he thinks he'll do "very well" with the lawsuit which he called "an open and closed case."

He also doubled down on the necessity of a border wall.

"We have absolute right to do that," Trump said. "We need strong borders. We have to stop drugs and crime and criminals and human trafficking. We have to stop all of those things that a strong wall will stop."

Trump foresaw the challenge, noting what was to come in his speech Friday announcing the emergency declaration.

"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," Trump said, "and we will possibly get a bad ruling and then we will get another bad ruling, and then we will end up in the Supreme Court, and hopefully we will get a fair shake and win in the Supreme Court, just like the ban ..."

The lawsuit cites Trump's own words as the "best evidence" his declaration of an emergency was invalid. On Friday, Trump said, "I didn’t need to do this, but I’d rather do it much faster," referring to getting money for his proposed wall on the southern border.

Asked on Fox News Sunday what Trump meant, White House senior adviser Stephen Miller said, "What the president was saying is that like past presidents, he could choose to ignore this crisis, choose to ignore this emergency as others have. But that's not what he's going to do."

The group that filed the complaint Monday includes the attorneys general from California, Colorado, Connecticut, Delaware, Hawaii, Illinois, Maine, Maryland, Michigan, Minnesota, Nevada, New Jersey, New Mexico, New York, Oregon and Virginia.

The lawsuit alleges that the states filing the suit "collectively stand to lose millions in federal funding that their National Guard units receive for domestic drug interdiction and counter-drug activities, and millions of dollars received on an annual basis for law enforcement programs," if Trump bypasses Congress to secure about $8 billion for the border wall through a mix of spending from congressional appropriations, executive action and an emergency declaration.

A senior White House official familiar with the plan told ABC News that $1.375 billion would come from the spending bill Congress passed last week; $600 million would come from the Treasury Department's drug forfeiture fund; $2.5 billion would come from the Pentagon's drug interdiction program; and through an emergency declaration: $3.5 billion from the Pentagon's military construction budget.

While it's unclear what specific projects may be affected by Trump's declaration, military projects and drug interdiction programs could be targeted as funds are reallocated.

The lawsuit claims public safety will be at risk and states' economies will be damaged, in addition to "irreparable environmental damage" to California and New Mexico's southern border.

"This 'emergency' is a national disgrace. Rather than focusing on fighting the real vulnerabilities facing Americans, the President is using the powers of America’s highest office to fan the flames of nativism and xenophobia. Our message to the White House is clear: California will not be part of this political theater. We will see you in court," Newsom said in a statement Monday.

Becerra said in a statement Monday, Trump "knows there is no border crisis, he knows his emergency declaration is unwarranted."

According to Customs and Border Protection data, apprehensions at the border are lower than they were over two decades ago. In 2001 there were 1,643,679 apprehensions at the border, compared with 396,579 in 2018 -- a more than 75 percent drop.

The 16-state coalition's lawsuit filed in the U.S. District Court for the Northern District of California is the third in a blitz of legal challenges that were filed shortly after Trump's declaration.

"We're suing President Trump to stop him from unilaterally robbing taxpayer funds lawfully set aside by Congress for the people of our states," Becerra said in Monday’s statement. "For most of us, the Office of the Presidency is not a place for theatre."