President Donald Trump scored a rare victory in the Court of Appeals for the Ninth Circuit with a ruling Monday that authorizes building a prototype wall along the U.S.-Mexico border — and lets the Trump administration repair an existing barrier.

In a 2-1 decision issued against the State of California and several environmental groups, the Ninth Circuit upheld a prior opinion by Obama-appointed U.S. District Judge Gonzalo Curiel, which determined the Department of Homeland Security was right to try to waive environmental laws in order “to expedite construction” of three separate border barriers near two cities in the Golden State, Law and Crime reported.

Written by Judge M. Margaret McKeown, the decision states the DHS Secretary “authorized the San Diego and Calexico projects because the existing barriers in this areas were built in the 1990s using a fence design ‘that is no longer optimal for Border Patrol operations.’”

The new construction erects a “stronger and taller barrier,” the judge wrote.

In the case, the Ninth Circuit — often criticized by Trump and other conservatives for its “liberal” slant — in this case disagreed with the liberal-leaning plaintiffs: California and multiple environmental organizations.

The decision also spelled out exactly why the environmental claims were dismissed:

“Having determined that the border barrier projects were authorized…” the court wrote. “We have little trouble concluding that the environmental claims were also properly dismissed. The Secretary has waived the legal requirements that California and the environmental groups allege DHS violated…we lack jurisdiction to consider any argument challenging the waivers themselves.”

Environmentalists have argued border barriers are disastrous for ecosystems and wildlife since they disrupt habitats, breeding grounds and migration paths, The Hill noted.

Monday’s ruling only affects DHS actions to repair or improve existing border fencing, not Trump’s proposals for a wall, The Hill reported.