“The government is not here to deny there is a possibility of torture,” Mr. Curiel told a federal judge. “But the forum for those allegations to be aired is the government of Mexico.”

The Arellano-Félix cartel kept Mr. Curiel in its sights. One of the suspected gunmen, according to court filings, was recorded in prison saying he “had requested and received permission from the leaders of the Arellano cartel to have Curiel murdered,” forcing Mr. Curiel to live for a while under guard.

He and Mr. Vega, whose father also was Mexican, met regularly with their counterparts across the border. Mr. Vega said their ability to speak Spanish and their Mexican roots were helpful, ultimately leading to the first extradition of a suspected Mexican drug kingpin to the United States in 2001.

Judge Curiel was appointed to the bench in San Diego in 2007 by Gov. Arnold Schwarzenegger, a Republican. President Obama nominated him to the federal bench in late 2011, and he was confirmed by the Senate the following year. Judge Curiel, whose parents are deceased, is married to a probation official and has a young daughter.

For his family, the attacks on their heritage have not gone unnoticed. Raul Curiel said that Mr. Trump was “ignorant” for calling his brother Mexican, noting that they were born in the United States. He said that he speaks to his brother regularly and that the most frustrating part of the Trump episode were the questions about his professionalism.

“Trump called him a hater, and regardless of whether he is or not, that has nothing to do with how he’s doing his job,” Raul Curiel said.

Mr. Trump and his supporters have said that Judge Curiel is treating him unfairly in the case, in which some former students of Trump University claim they paid thousands of dollars for worthless real estate classes. Mr. Trump’s supporters have pointed to Judge Curiel’s affiliation with La Raza Lawyers of California, a Latino bar association that Mr. Trump asserts is an advocacy group, and to his appointment by Mr. Obama as evidence of a conflict of interest.