Supreme Court nominee Neil Gorsuch, peppered with questions for hours from senators trying to pry loose his views on a host of hot-button cases, responded Tuesday with a consistent answer: His job is to follow the law, and set aside his personal beliefs.

With a disarming and amicable manner that rarely wavered, the appeals court judge repeatedly stressed that what matters is his independence, respect for precedent and willingness to hear the facts and keep an open mind on the cases before him.

“I’m a fair judge,” he vowed, under questioning from the committee’s top Democrat, California Sen. Dianne Feinstein.

Put another way, he told Sen. Orrin Hatch, R-Utah, “A good judge doesn’t give a whit about politics, or the political implications of his or her decision.”

The nominee faced lawmakers’ questions for the first time at Tuesday’s hearing. The 10th Circuit judge is virtually assured support from majority Republicans but on Tuesday sought to assuage Democrats’ concerns he would effectively serve as a reliable conservative vote on a split court, if confirmed to replace the late Justice Antonin Scalia.

Like past nominees in confirmation hearings dating back decades, President Trump’s pick was loath to reveal his opinion on seminal court rulings during his turn before the Senate Judiciary Committee. However, he made an exception for the two-year-old decision extending same-sex marriage nationwide as "settled law," a term he did not apply to any other decision.

Gorsuch insisted he would never be “a rubber stamp," as lawmakers of both parties specifically pressed on whether Gorsuch would be willing to rule against the president who nominated him.

“I have no difficulty ruling against or for any party, other than based on what the law and the facts of a particular case require,” Gorsuch said, adding, “There’s no such thing as a Republican judge or a Democratic judge, we just have judges in this country.”

Gorsuch even quipped that it was “a softball” when Senate Judiciary Committee Chairman Charles Grassley, R-Iowa, asked if he would have any trouble breaking with Trump.

During a tricky line of questioning from Sen. Lindsey Graham, R-S.C., on whether Trump could face prosecution for reinstating waterboarding, Gorsuch said, “No man is above the law.”

When questioned by Sen. Richard Blumenthal, D-Conn., about President Trump's previous criticism of judges who ruled against him, Gorsuch said we "have to accept criticism with some humility," but later admitted that such remarks by anyone were "disheartening [and] demoralizing."

"Anyone including the President of the United States?" Blumenthal asked.

"Anyone is anyone," said Gorsuch, who later cut off attempts by Blumenthal to press the matter further, saying "I've gone as far as I can go, ethically, with the canons that restrict me about speaking on cases."

The tone of the hearing was mostly cordial, but grew tense at times.

In a raw moment under questioning from Rhode Island Democratic Sen. Sheldon Whitehouse, Gorsuch said there’s a lot about the confirmation process he regrets.

"I regret putting my family through this," he said. "But it is what it is."

Whitehouse questioned the nominee on the role of money in politics and chided him for not giving a definitive answer when asked about keeping distance from interests before the court.

“If you don’t know that, you’re going to have a very hard time figuring out how to make the right call,” Whitehouse said.

Democrats throughout the hearing tried to discern Gorsuch’s views on issues ranging from abortion rights to campaign finance to gun control – as well as probe his role in defending Bush-era interrogation policies while in that administration’s Justice Department.

Gorsuch has not ruled directly on the right to an abortion, and was pressed on the topic by Feinstein. He said that legalized abortion is “precedent” and “worthy of treatment as precedent like any other.”

Graham later asked Gorsuch whether Trump had asked him to overturn Roe v. Wade. The nominee answered no, and said that if Trump had, “I would have walked out the door.”

On the major gun rights case known in short-hand as “Heller,” he also said that it’s the “law of the land.”

Asked by Feinstein whether he agreed with the decision overturning a sweeping handgun ban in the nation’s capital, he said, “It’s not a matter of agreeing or disagreeing.”

On the sidelines, Trump weighed in on Twitter, calling him “someone with a brilliant legal mind & a commitment to constitutional principles.”

The hearing followed an initial day of opening statements, where Democrats and Republicans traded partisan barbs and Gorsuch himself tried to cut through the discord – vowing to be a “faithful servant of the Constitution” and apply the law “impartially.”

Democrats have their doubts, however, and signaled in advance they would have tough questions for Gorsuch during what is expected to be nearly a full week of hearings.

Sen. Patrick Leahy, D-Vt., on Tuesday seemingly tried to get Gorsuch to tip his hand as to how he views the ongoing court challenges to the Trump administration’s attempted suspension of travel and immigration from six Muslim-majority countries and the refugee program.

Leahy asked more broadly about the constitutionality of religious tests, to which Gorsuch said he would “apply the law.” When given the example of a religious test in the military, Gorsuch said that, specifically, is against the law, while declining to comment on the current case.

An exchange with Sen. Dick Durbin, D-Ill., was particularly tense, as the senator grilled him on everything from the Hobby Lobby case concerning the right of religious nonprofits to skirt ObamaCare’s contraceptive mandate to gay rights.

Gorsuch assured Durbin the Supreme Court has held same-sex marriage is “protected by the Constitution.”

Democrats are still smarting over Senate Republicans’ refusal to consider former President Barack Obama’s nominee for the same seat, Judge Merrick Garland. Amid the yearlong delay, Trump won election and was able to nominate Gorsuch instead. That history hung over the start of Gorsuch’s hearings.

Leahy charged Monday that Gorsuch was selected by “extreme interest groups” and named by a president who lost the popular vote, and reiterated those concerns Tuesday.

While Monday marked the opening day of his confirmation hearings, that session was largely overshadowed by FBI Director James Comey’s explosive appearance before the House intelligence committee where he confirmed a long-running probe into Russian meddling in the 2016 presidential race, including possible links to the Trump campaign.

Some Democratic senators not on the Judiciary Committee called for a pause in the confirmation process after Comey's testimony, which Grassley dismissed as a "ridiculous idea."

Massachusetts Sen. Elizabeth Warren said on Twitter that while the investigation continues, "lifetime court appointments can wait."

The Associated Press contributed to this report.