Nineteen states sued the Trump administration in federal court on March 3, challenging President Donald Trump’s plan to divert $3.8 billion in fiscal 2021 military funds to build a wall along the U.S.-Mexico border—the second legal challenge in two years now targeting a total of $10 billion in diverted money.

State attorneys general argue that diverting funds from military infrastructure projects and from states' national guard units will damage their economies.

“Military construction projects in plaintiff states remain at risk of being defunded,” the California Attorney General’s office said in a statement.

The 19 states filing the complaint in federal district court in San Francisco on March 3 are:  California, Colorado, Connecticut, Hawaii, Illinois, Maine, Maryland, Massachusetts, Michigan, Minnesota, Nevada, New Jersey, New Mexico, New York, Oregon, Rhode Island, Vermont, Virginia and Wisconsin.

They also requested an injunction against the diversion of funds.

The Sierra Club, the American Civil Liberties Union and the Sothern Border Communities Coalition on Feb. 28 also sued the administration in the San Francisco court challenging the diversion of funds based on environmental destruction of the border region.

Both lawsuits claim the administration has no authority to divert the funds and that Congress has the sole authority to appropriate federal funding.

Rep. Ken Calvert of California, a Republican, warned at a hearing before the House Appropriations Defense Subcommittee that shifting the funds is troublesome.

“This kind of reprogramming has to end,” he said, according to press reports.

California expects $4 billion in military construction projects to be diverted, according to the complaint. It also understands that nearly $1 billion will be diverted from its National Guard units, which would be used to respond to natural disasters and for other such functions.

Maryland stands to lose $614 million in construction projects, with $1 billion in additional military construction loses expected in other states. Eight states listed a specific amount they expect to lose in construction funds.

President Trump declared a national emergency last year to divert $6.7 billion from military construction projects, which triggered a legal challenge in February 2019 from 16 states to stop that diversion.

Massachusetts, Rhode Island and Vermont joined those states in the current lawsuit.

The lawsuits were filed in the same federal court that said last year’s diversion of $6 billion in military funds was illegal. The administration’s challenge of those rulings are currently pending before the Ninth Circuit Court of Appeals in California.

The most recent appeal is scheduled for argument March 10.

The U.S. Supreme Court in December temporarily allowed building the wall with last year’s diverted military while the lawsuits are appealed.