A federal appeals court has rejected arguments by the state of California and environmental groups who tried to block the reconstruction of sections of the U.S.-Mexico border wall.

The U.S. 9th Circuit Court of Appeals ruled Monday that the Trump administration did not exceed its authority by waiving environmental regulations to rebuild sections of wall near San Diego and Calexico.

The court upheld a lower court ruling that found the Illegal Immigration Reform and Immigrant Responsibility Act of 1996 allows the Department of Homeland Security to avoid lengthy environmental reviews to build border barriers.

The 2-1 ruling comes as Congress prepares to present the president with a government funding deal that includes some which allows for border fencing but no walls.