U.S. District Judge Gonzalo Curiel, who the president once asserted could not be fair to Trump because of Curiel’s Mexican heritage, has ruled in favor of the White House in a lawsuit over construction of a border wall.

The Trump administration will be able to move ahead with building a wall along the country’s southern border after a federal judge ruled the administration could continue waiving environmental regulations for the barrier’s construction.

In an added twist, the decision was handed down by the U.S. District Judge Gonzalo Curiel, who the president once asserted could not be fair to Trump because of his Mexican heritage and the president’s stance on border security and immigration. Those comments came during a separate lawsuit brought against then-candidate Trump and his Trump University.

Tuesday’s ruling, which was first reported by The Hill, was in response to a lawsuit brought by environmental groups that had challenged whether the White House had the authority to circumvent federal regulations in order to build the barrier. The Department of Homeland Security announced in October that it had completed construction of eight wall prototypes that would be tested over time.

The Department of Homeland Security called the decision a victory for a government intent on securing the border.

“Walls have worked in Yuma, Arizona and San Diego, California, where both areas have seen a 95 percent drop in attempted illegal border crossings,” the DHS’s acting press secretary said. “Simply put – walls work. The Department of Homeland Security looks forward to building the wall where our frontline operators say it is needed and in accordance with all applicable laws.”

It’s still unclear however, when construction of the barrier will continue or whether it will occur. On the campaign trail, Trump said he envisioned a wall from the Pacific Ocean to the Gulf Coast, but has since backtracked slightly and conceded some areas of the border are not suited for a wall. Some Texas Republicans, including U.S. Sen. John Cornyn, and U.S. Rep Will Hurd of Helotes, have offered legislation that would employ technology and more boots on the ground instead of a full-length barrier. Texas would indeed be the most affected by a wall or any other barrier, as it shares 1,254 miles of border with Mexico.

It’s also unclear where the Trump administration will get the money for the wall. Congress has yet to fund the project and the Mexican government, who Trump had promised would pay for the wall, has balked at any suggestion that it finance the barrier. Wall funding was recently included in part of an immigration deal that would have protected millions of undocumented immigrants, called “Dreamers” from deportation. But the U.S. Senate failed to pass any of the immigration proposals that made it to the upper chamber earlier this month.

In some areas of Texas, including El Paso, Hudspeth, Hidalgo and Cameron counties, there already exists a steal fence that was built after the Bush administration passed the 2006 Secure Fence Act, which mandated that hundreds of miles of barrier be built in order to stop the flow of illegal immigration and illicit drugs.

A Texas Tribuneinvestigation of that process found that many border Texans got a raw deal when the federal government seized their private land for the fence’s construction, while others were able to get a better offer if they hired an attorney.

Julián Aguilar reports on politics and border affairs from the Texas-Mexico border. This storyis published courtesy of the Texas Tribune, a nonpartisan, nonprofit media organization that informs Texans — and engages with them — about public policy, politics, government, and statewide issues.