Construction crews prepare a set of border wall prototypes along the U.S. border with Mexico on U.S. Customs and Border Protection property near San Diego, California.

The U.S. Supreme Court on Monday said it would decline to hear a challenge to the Trump administration's proposed border wall brought by environmental groups who say construction could threaten endangered animals and violate environmental laws.

The groups asked the court to reject a 1996 law signed by President Bill Clinton that provides the executive branch with authority to waive environmental laws if those laws impede construction of barriers and roads near the border.

The law was expanded by Congress in 2005 to give the Department of Homeland Security authority to waive "all legal requirements" that could stand in the way of border construction.

The environmental groups said that the government's ability to waive the laws is unconstitutional. The justices did not issue a ruling on that matter.

But because they will not hear the case, a February ruling by a federal judge in San Diego will remain in place.

That ruling in favor of the government was handed down by U.S. District Court Judge Gonzalo Curiel. In 2016, then-presidential candidate Donald Trump said the Indiana-born judge could not be impartial in a case concerning Trump University because he was "Mexican." But, in February, Trump cheered Curiel's ruling as a legal victory.

Trump tweet

The Animal Legal Defense Fund, Defenders of Wildlife and Center for Biological Diversity were supported in their case by a coalition including nine Democratic members of the House of Representatives and the libertarian think tank The Cato Institute.

Among the Democrats urging the justices to take the case was Rep. Beto O'Rourke, a Texan who has floated the possibility of a 2020 presidential run.

The Center for Biological Diversity has said that construction of a 2,000 mile wall along America's southern border represents a "looming tragedy for the region's diverse wildlife and people, as well as its rugged and spectacular landscapes."

Trump has made construction of the wall a signature element of his agenda, saying it is necessary to enforce the nation's immigration laws.

WATCH: Tech from self-driving cars could solve border security without Trump's $5 billion wall