San Diego is asking a federal court to stop further fence construction and to declare the city’s right to own and use the land, according to the lawsuit filed on Jan. 5 in the U.S. Southern District Court. The city sued the federal agencies it said built the barrier—Homeland Security and Defense—along with senior officials including Kristi Noem and Pete Hegseth, and other federal figures named in the complaint.

In the case, San Diego argues that U.S. Marines “illegally entered city land” in December and built razor wire fencing in Marron Valley, east of Otay Mountain. The city’s complaint says the fencing damaged sensitive environmental features, including “protected plant and wildlife habitats, riparian areas, and vernal pools,” and that it interferes with the city’s ability to reach the site.

The city also contends that the fences jeopardize conservation programs designed to protect the habitat. It is seeking an order halting additional construction and a court declaration addressing ownership and use of the property, as San Diego frames the matter as a trespass and an environmental harm dispute.

Heather Ferbert, the city attorney, said in a statement that the city would not allow federal agencies to disregard the law and damage municipal property. “The City of San Diego will not allow federal agencies to disregard the law and damage city property,” Ferbert said. “We are taking decisive action to protect sensitive habitats, uphold environmental commitments, and ensure that the rights and resources of our community are respected.”

San Diego’s allegations position the fight as another front in California’s broader legal clashes with the Trump administration over immigration enforcement and how far federal authority can reach inside the state. Recent high-profile disputes in California have involved the use of the National Guard and active-duty military in cities, while this lawsuit centers on wildlands along the border.

The Department of Defense declined to comment, citing pending litigation. The Department of Homeland Security did not respond to questions, and neither agency had filed responses to the lawsuit yet, according to the report that carried the city’s complaint.

The suit arrives after a federal judge ordered the National Guard to leave Los Angeles and return to Gov. Gavin Newsom’s control in December. Shortly afterward, the Supreme Court blocked deployment of the National Guard in Chicago, effectively shutting down the administration’s appeals against California—moves that the lawsuit appears to echo, though this time the legal battleground is environmental land rather than urban neighborhoods.