California and 18 other states are suing the Trump administration over its latest allocation of military funding to build the border wall.

The lawsuit, which was filed in the U.S. District Court for the Northern District of California, comes in response to the White House’s new $3.8 billion allocation to construct the wall along the United States' border with Mexico. The most recent allocation is in addition to previous diversion of Pentagon funds.

“Use of these additional federal funds for the construction of a border wall is contrary to Congress’s intent and in violation of the U.S. Constitution,” lawyers for the states wrote in a court filing.

The filing continues: “This use would divert funding that has been appropriated to support the active military, the states’ National Guard units, and other [Defense Department] projects in Plaintiff States, including, on information and belief, military construction projects, for the non-appropriated purpose of constructing a border wall.”

TRUMP TO DEPLOY BORDER PATROL TO SANCTUARY CITIES TO HELP ICE CATCH UNDOCUMENTED IMMIGRANTS

The lawsuit, which comes after a similar one filed by the American Civil Liberties Union and other groups last week, is just the latest roadblock opponents of the border wall are hoping to put up to thwart the progress of one of Trump’s signature campaign proposals.

Last Thursday, a U.S. judge in Seattle ruled that Trump may not divert $89 million intended for a military construction project in Washington state to build his border wall.

The U.S. Supreme Court and some other courts have said the administration can begin diverting billions of dollars in military spending to the wall, and work has been done on some sections.

But U.S. District Judge Barbara Rothstein ruled Thursday that a case brought by Washington Attorney General Bob Ferguson contains different issues which are not covered by those decisions.

Rothstein found that diverting the money is unlawful because Congress — which has the power of the purse under the Constitution — specifically barred Trump from spending additional money on the wall. The decision was also unlawful because it would take money that Congress appropriated for military construction and use it for domestic law enforcement, she said.

“Congress repeatedly and deliberately declined to appropriate the full funds the President requested for a border wall along the southern border of the United States,” Rothstein wrote.

CLICK HERE TO GET THE FOX NEWS APP

While Trump long insisted that Mexico would pay for the wall, that hasn't been the case. Congress in late 2018 and early 2019 refused to give Trump all of the money he wanted for a border wall, leading to a 35-day partial government shutdown. Lawmakers eventually gave him $1.4 billion.

In reaction, Trump declared a national emergency. The administration claimed that allowed him to shift almost three times that much money — $3.6 billion — from military accounts to build a combined 175 miles of fencing in California, Arizona, Texas and New Mexico.

The U.S. Supreme Court last summer lifted a court order that prevented the government from spending $2.5 billion from the Defense Department’s money for military pensions and anti-drug efforts. But legal challenges continue with regard to that money as well as the $3.6 billion the Pentagon is diverting from military construction projects.

Fox News’ William Mears and The Associated Press contributed to this report.