A federal judge in Washington, D.C., has dismissed claims brought by environmental groups alleging President Donald Trump’s declaration of a national emergency to tap Pentagon funds for a border wall was unconstitutional, but allowed some claims alleging violations of administrative law to survive.

The Center for Biological Diversity and the Rio Grande International Study Center, each joined by other groups, filed separate lawsuits challenging Trump’s actions, claiming it went beyond his powers as president and violated several other statutes.