A federal judge cleared the way Tuesday to build a wall along the southern border, dealing a major win to the Trump administration.

The state of California and environmental groups had been counting on a lawsuit to derail plans to build a border wall, but the ruling concluded the administration has the power to waive a series of environmental laws to speed up its construction.

U.S. District Court Judge Gonzalo Curiel issued the ruling. He’s the same judge Pres. Donald ridiculed during and after the 2016 campaign, infamously accusing him of being a “hater” and unable to render an unbiased decision because of his Mexican heritage.

Judge Curiel said his decision should not be perceived on the merits of whether a wall was good or bad policy. He said he had to conclude whether the government has the power to build it.

“In its review of this case, the court cannot and does not consider whether underlying decisions to construct the border barriers are politically wise or prudent,” he wrote in a 101-page ruling.