Updated

The federal judge who then-candidate Donald Trump once accused of being biased against him because of his tough immigration stance could end up deciding whether the president gets his long-promised border wall.

U.S. District Court Judge Gonzalo Curiel will hear a case Friday regarding the Trump administration’s ability to ignore environmental laws in the construction of the wall along the U.S.-Mexico border, Fox News has confirmed.

Curiel, whose parents emigrated from Mexico, was attacked by Trump in 2016. Trump said the judge held “tremendous hostility” against him in a lawsuit involving Trump University because of Curiel’s Mexican descent.

Trump doubled-down on the controversial remarks during the campaign and told The Wall Street Journal that Curiel has "an absolute conflict of interest" because of his Mexican heritage in addition to "an inherent conflict of interest" because of the proposal to build a border wall.

Montes case

U.S. District Court Judge Gonzalo Curiel. (U.S. District Court)

If Curiel rules against Trump, it could undermine the construction of barriers on unfenced portions of the border. If the ruling is favorable to the White House, it would let the administration to issue waivers on environmental laws and build sections of the border.

Curiel's role in the border case was first reported by McClatchy.

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

Curiel is a native of Indiana. After receiving undergraduate and law degrees from Indiana University, he served as a federal prosecutor and a judge in the California state judicial system before being nominated to the federal bench by President Barack Obama in 2011.

California Attorney General Xavier Becerra told at the time that the government “has once again ignored laws it doesn’t like in order to resuscitate a campaign talking point to build a wall on our southern border.”

U.S. Attorney General Jeff Sessions said in September that he expects to win the lawsuit. “The United States government has the control of that border and a responsibility to secure it,” he said.

Fox News' Bill Mears and The Associated Press contributed to this report.