Judge Gonzalo Curiel (pictured), who was berated by Donald Trump during the presidential campaign, says he's inclined to rule on a case involving Trump's proposed border wall

A judge who was berated by Donald Trump during the presidential campaign says he's inclined to conclude he can decide a lawsuit that challenges the president's proposed border wall.

U.S. District Judge Gonzalo Curiel said during 2.5 hours of arguments Friday in San Diego that he was leaning toward deciding he has jurisdiction in a lawsuit that alleges the Trump administration overreached in waiving laws that require environmental and other reviews.

The administration argues he doesn't have jurisdiction.

Curiel asked the administration and wall opponents to file additional briefings by the end of Tuesday.

The state of California and advocacy groups want Judge Curiel to rule that a border wall with Mexico must go through normal environmental reviews, which could block construction or at least cause major delays.

The challengers contend that authority to waive the environmental reviews under a 2005 law expired.

California is joined by the Center for Biological Diversity, the Sierra Club, Defenders of Wildlife and the Animal Legal Defense Fund.

The state of California and advocacy groups want Judge Curiel to rule that a border wall with Mexico must go through normal environmental reviews

The challengers contend that authority to waive the environmental reviews under a 2005 law expired

The judge said he would likely within days whether to dismiss the challenge by the state of California and environmental advocates or let it proceed.

Trump repeatedly criticized Curiel in 2016 as lawsuits against Trump University neared trial, suggesting that the judge's Mexican heritage meant he could not be impartial in the fraud cases. Trump settled for $25 million shortly after winning the election, without admitting wrongdoing.

Curiel, who was forced out of his home and needed around-the-clock protection when he prosecuted Mexican drug kingpins in the 1990s, was unfazed by Trump's criticism during the campaign, said Gregory Vega, a former U.S. attorney in San Diego and longtime friend.

'He's had a credible threat made on his life. I don't think when he was called names, I don't think that really bothered him,' said Vega.

The Center for Biological Diversity was first to sue over the wall, with three other groups — Sierra Club, Defenders of Wildlife and the Animal Legal Defense Fund — later filing a lawsuit.

California Attorney General Xavier Becerra, a Democrat, was close behind, and Curiel consolidated all three cases into one.

Donald Trump (R) speaks as university president Michael Sexton (L) looks on during a news conference announcing the establishment of Trump University May 23, 2005

At issue is a 2005 law that gave the Homeland Security secretary broad powers to waive dozens of laws requiring environmental and other reviews, including the National Environmental Policy Act, Clean Air Act and Endangered Species Act. The reviews are time-consuming and subject to prolonged legal challenges.

The Trump administration has issued three waivers since August, two to build barriers in parts of California and one in part of New Mexico. President George W. Bush's administration issued the previous five waivers.

Trump has insisted on $25 billion for border security measures as part of an immigration deal that would include a path to citizenship for 1.8 million people. A proposal by Customs and Border Protection calls for spending $18 billion over 10 years to extend barriers to nearly half the 2,054-mile border.

One of the administration's environmental waivers is for San Diego, where private contractors recently built eight imposing prototypes to guide designs for future construction.