On Wednesday, California Attorney General Xavier Becerra announced that the state had filed a lawsuit against the Trump administration over its plans to construct a border wall in San Diego and Imperial County. Citing the administration’s decision to expedite waiving more than three dozen environmental laws to construct the wall, Becerra said that the lawsuit would force the Trump administration to follow the law instead of relying on outdated federal statues.

“There’s a right way and a wrong way,” Becerra said of the border wall’s construction in a press conference. “In this case, we’re going to go to court to make sure that they do this the right way.”

Last week, the Department of Homeland Security officially approved the administration’s request to waive a slew of environmental laws in construction of the border wall near San Diego, relying on a federal statute that allows the federal government to expedite construction of barriers or border projects that serve a national security purpose. The waiver includes cornerstone laws like the National Environmental Policy Act, Endangered Species Act, Clean Water Act, and the Clean Air Act.

According to the lawsuit, however, the statute used by the administration to expedite the construction process — and bypass environmental laws — only pertains to projects constructed before 2009. The statute also requires that expedited projects be constructed in a “priority area,” a designation that Becerra argues was never given to San Diego or Imperial County.

“In this particular case, the Trump administration chose to act outside the law, and unless they’re going to stop, we’ll have to go to court to stop them,” Becerra said.

The lawsuit also claims that waiving the environmental laws constitutes a violation of the U.S. Constitution, which prohibits government officials from “unilaterally and arbitrarily [waiving] any law of their choosing.”

California’s lawsuit also alleges that the Trump administration failed to conduct an environmental impact statement with regard to construction of the border wall near San Diego and Imperial County, which would constitute a violation of the National Environmental Policy Act.

Becerra’s lawsuit is not the first legal challenge to Trump’s border wall. In April, the Center for Biological Diversity — joined by Rep. Raúl Grijalva (D-AZ) — filed a lawsuit against the Trump administration arguing that the entire border wall project violated NEPA requirements by failing to take into account potential environmental impacts of the wall’s construction. In September, the Center for Biological Diversity expanded that lawsuit to include a challenge to the San Diego portion of the project specifically, also calling into question the Department of Homeland Security’s authority to waive environmental laws for that specific portion of the wall.

By waiving environmental laws, the Trump administration would be able to begin construction on the project without studying the wall’s potential impacts on nearby ecosystems, which could be extensive. According to a U.S. Fish and Wildlife report from 2016, more than 100 animals listed as endangered, threatened, or candidates for protection under the Endangered Species Act could be impacted by the wall.

In skirting environmental laws, the administration would also not be required to meet with stakeholders that would be affected by the project. Already, the proposed wall has drawn stiff opposition from San Diego residents, with 48 percent opposing its construction, according to a San Diego Union-Tribune poll from January.

“The Trump administration has once again ignored laws it doesn’t like in order to resuscitate a campaign talking point to build a wall on our southern border,” Becerra said. “President Trump has yet to pivot from candidate Trump to leader of a nation built on the rule of law. That’s dangerous.”

Despite legal challenges to the project, preliminary construction has already begun for some segments of the wall. In South Texas, U.S. Customs and Border Patrol has started making preparations for construction of a portion of the wall that would run through the Santa Ana Wildlife Refuge, which is home to at least 400 species of birds, 450 types of plants, and half of the butterfly species found in North America.

The San Diego portion of the wall — which would be a 15-mile stretch of wall and prototype projects — would not begin construction until next February, though contracts would likely be awarded sometime in November.