Updated

President Trump on Wednesday hailed a “big victory” in the courts for his proposed border wall, after a federal judge ruled against an environmental challenge to Trump’s central campaign promise.

U.S. District Court Judge Gonzalo Curiel found in favor of the administration Tuesday in a case that asked whether the government could ignore environmental laws to construct the southern border wall. The project had been challenged by environmental groups and the state of California.

Trump touted the victory in a tweet, saying that it allows the administration to proceed, adding: “OUR COUNTRY MUST HAVE BORDER SECURITY!”

FEDERAL JUDGE RULES AGAINST CHALLENGE TO TRUMP BORDER WALL 

In the tweet, he also said sections of the wall that California wants built now “will not be built until the whole Wall is approved.” It was not clear what he was referring to, but it is possible he was referring to a recent project to replace two miles of wall in downtown Calexico.

The Los Angeles Times reported that the barrier was made of recycled metal scraps and a landing mat and will be replaced by 30-foot high bollard-style posts.

Curiel’s ruling means the administration can now issue waivers on environmental laws and build sections of the wall.

Curiel was the judge whom Trump accused of being biased due to his Mexican-American heritage as he ruled over a case involving Trump University. Then-candidate Trump was criticized by both Republicans and Democrats for his comments.

California’s state officials pushed back against the border wall ruling.

California Attorney General Xavier Becerra said in a statement that his office “will evaluate all of our options and [is] prepared to do what is necessary to protect our people, our values, and our economy from federal overreach.”

“A medieval wall along the U.S.-Mexico border simply does not belong in the 21st century,” Becerra said.

The Trump administration was sued back in September as part of its effort to block any construction of the border wall.

Trump also tweeted Wednesday in praise of border security efforts.

"45 year low on illegal border crossings this year. Ice and Border Patrol Agents are doing a great job for our Country. MS-13 thugs being hit hard," he tweeted.

Fox News’ Alex Pappas contributed to this report.