Three of U.S. President Donald Trump's eight border wall prototypes are shown near completion along U.S.- Mexico border in San Diego, California, Oct. 23,  2017.
Three of U.S. President Donald Trump's eight border wall prototypes are shown near completion along U.S.- Mexico border in San Diego, California, Oct. 23, 2017.

WASHINGTON - U.S. President Donald Trump is praising a decision allowing construction of the wall he wants built along the U.S.-Mexican border, a ruling handed down by the same federal judge he ridiculed during the presidential campaign because of the jurist's Mexican heritage.

The U.S. leader, in a Twitter comment, said the decision by Judge Gonzalo Curiel on Tuesday was a "big victory." He also said, "OUR COUNTRY MUST HAVE BORDER SECURITY." Trump did not mention his previous criticism of the jurist.

Trump said despite the court ruling in his favor, he would not build parts of the wall until the entire structure along the 3,200-kilometer border with Mexico is approved by Congress, minus areas where the natural terrain makes a barrier unnecessary. But Congress has yet to approve funding for the wall, which could cost more than $20 billion.

Trump said California wanted construction to start; however, the western state was one of the groups that unsuccessfully sought to block the wall and said it is now considering whether to appeal the ruling. Another of the opponents, the Center for Biological Diversity, said it would appeal.

FILE - This undated photo provided by the U.S. Dis
FILE - This undated photo provided by the U.S. District Court shows Judge Gonzalo Curiel.

The Senate earlier in February defeated proposals to fund construction of at least part of the wall, coupled with other immigration policy changes. Trump supported a measure calling for $18 billion in funding for the wall, sharp cuts in legal immigration to the United States, and protection against deportation for hundreds of thousands of young immigrants who years ago were brought illegally into the country. That legislation fell far short of advancing.

Curiel wrote that the opponents of the wall in the court case failed to prove the Trump administration overstepped its legal authority by ordering the wall.

The judge said, "The court cannot and does not consider whether the underlying decisions to construct border barriers are politically wise or prudent."

California and other groups opposed to the wall had argued the project violates environmental rules and the rights of states to decide whether they want the wall on their side of the border.

The Department of Homeland Security praised the ruling.

"Border walls have proven to be extremely effective in preventing the flow of drugs and illegal aliens across our borders," according to Homeland Security. "Walls have worked in Yuma, Arizona and San Diego, California, where both areas have seen a 95 percent drop in attempted illegal border crossings. 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."

Curiel, during the 2016 presidential campaign, oversaw lawsuits of alleged fraud by Trump University, which marketed instructional classes on real estate deals. Trump, then a Republican candidate, ridiculed the U.S.-born judge over his Mexican heritage and accused him of bias in rulings against him.

Trump defended the school against the fraud claims but, just before he took office last year, agreed to a $25 million settlement with former students without admitting guilt.