Judge Neil Gorsuch skirted the controversies surrounding President Trump throughout his Senate hearing on his Supreme Court nomination, but could not avoid the battle over immigration.

Gorsuch's approach to the hearing and his statements and judicial record indicate he might lock horns with Trump if confirmed to the high court.

One of the leading figures battling Trump's travel ban in the courts introduced Gorsuch at the Senate Judiciary Committee hearing. Former Obama administration acting solicitor general Neal Katyal joined Colorado Sens. Cory Gardner and Michael Bennet in presenting the judge to the Judiciary Committee.

Katyal, who noted that he had argued 32 cases before the high court during the last decade, is one of the leading attorneys for Hawaii in its suit against the Trump administration over the travel ban. Katyal cited his concerns about the president's policies and actions as one of his chief reasons for supporting Gorsuch in his remarks before the Senate on Monday.

"Between the president's attacks on the judiciary and his controversial policies, he seems intent on testing the independence and integrity of our court system and that brings me back once again to my support of Judge Gorsuch," Katyal said. "As a judge, he's displayed a resolute commitment to the rule of law and the judiciary's independence. … When the judge believes the government has overstepped its powers, he's willing to rule against it."

While Gorsuch thanked Katyal for the introduction, Katyal is no ally of Trump or the political infrastructure helping the president advance his agenda. When Katyal began representing Hawaii in its travel ban suit this month, a GOP aide distributed criticism labeling him " Al Qaeda's Best Lawyer." The label came from Katyal's previous legal representation of a person who professed to be a bodyguard of Osama bin Laden.

Gorsuch showed no sign of sharing the Republican Party's concerns about Katyal and repeatedly referred to his remarks throughout the hearings. The 10th Circuit Court of Appeals judge stressed his independence throughout the hearings, proffering remarks such as "I'm a judge. I don't have spokesmen. I speak for myself," and "I don't wear a crown, I wear a robe."

On the controversial travel ban and the litigation working its way through federal courts, Gorsuch was mum. But the Supreme Court nominee did make several mentions of how his rulings affected the "undocumented immigrant" and the "non-Americans."

"I've ruled for disabled students, for prisoners, for the accused, for workers alleging civil rights violations, and for undocumented immigrants. Sometimes too I've ruled against such persons," Gorsuch said Monday. "My decisions have never reflected a judgment about the people before me. Only a judgment about the law and the facts at issue in each particular case. A good judge can promise no more than that and a good judge should guarantee no less. For a judge who likes every outcome he reaches is probably a pretty bad judge stretching for policy results he prefers rather than those the law compels."

When talking about cases and issues involving immigration during the hearings, Gorsuch repeatedly used the phrase "undocumented immigrant." He once apologized for accidentally using the phrase "undocumented alien," but did not apologize when using the same language the next day. It is hard to know whether the phrasing used by Gorsuch, who chose his language carefully throughout the hearings, revealed anything about how he views the issue or whether he was considering how senators' views of the topic may affect his nomination.

Prognostication on precisely how Gorsuch may view the travel ban if confirmed to the high court is hard to accomplish by evaluating past cases he has heard as a judge or argued as an attorney.

In United States v. Rosales-Garcia, Gorsuch dissented from a 10th Circuit ruling that said a defendant was wrongly sentenced for his illegal re-entry into the U.S. But Gorsuch's dissent did not take issue with the practical outcome of the case, only the grammar of the statute at issue.

At other times, Gorsuch has defended immigrant clients. A group of attorneys who worked with Gorsuch during his time in private practice described Gorsuch's representation of one such person in a letter to the leadership of the Senate Judiciary Committee.

"Neil was not afraid to take on diverse and difficult cases. For instance, he once represented an Iranian immigrant and small businessman who had been cheated by a real estate developer," wrote attorneys who worked with Gorsuch at the law firm Kellogg, Huber, Hansen, Todd, Evans and Figel. "The case was a difficult one and did not start well: when questioning his first witness, Neil suffered a barrage of sustained objections. But, he kept at it with a belief in his client's position, doggedly presented his case, and obtained an amazing $10 million verdict for the client."

Gorsuch wrote majority and concurring opinions for the 10th Circuit in another immigration case, Gutierrez-Brizuela v. Lynch, which legal conservatives have enthusiastically cited as evidence that he may look to undo the Chevron doctrine. Chevron is a Supreme Court doctrine stipulating that courts should defer to executive agency interpretations of certain statutes unless they are deemed unreasonable.

Gorsuch's majority opinion for the court ruled that immigration officials exceeded their authority, but his concurring opinion urged reconsideration of Chevron deference. That opinion reflects his willingness to buck executive agency authorities when he deems it necessary, his supporters say.

Facing questions from Minnesota Sen. Al Franken on Tuesday, Gorsuch defended his decision to sound an alarm on the Chevron issue, saying that an illegal immigrant got caught in the "whipsaw" of bureaucracy.

"I'm a circuit judge. I don't tell my bosses what to do. I do, when I see a problem, raise my hand and tell my bosses 'I see an issue here,' and I did in that case," Gorsuch told Franken on Tuesday. "Not because of any big corporate interest but because of what happened to Mr. Gutierrez, an undocumented immigrant to this country, and the whipsaw that he was placed in by a change in law affected by an administrative agency, a bureaucracy, overruling a judicial precedent and telling him he now had to wait not 10 years out of the country but 14 something like that."

Whether Gorsuch would thwart Trump on the travel ban is anyone's guess, but Gorsuch said multiple times during the hearings that the president did not seek to extract commitments from him on overturning specific cases or precedents.