U.S. Supreme Court nominee Brett Kavanaugh was pressed during the third day of his Senate Judiciary Committee confirmation hearing Thursday on whether he pledged loyalty to President Donald Trump.

“There is an issue of this president asking for loyalty tests from the people he’s putting forward for offices,” Sen. Cory Booker (D-N.J.) told Kavanaugh. “I’m just asking what kind of loyalty is being required of you for this job. That’s what I’m building to.”

Trump nominated Kavanaugh July 9 to succeed the retiring Justice Anthony Kennedy. Committee Democrats have repeatedly argued that controversies surrounding the president raise concerns about Kavanaugh’s nomination.

Related: Kavanaugh Clarifies He Doesn’t Back Unlimited Presidential Powers

Booker accused the president of being a liar and sexist who appears to have picked a nominee who will help him get out of legal trouble. He also denounced the president for criticizing Attorney General Jeff Sessions, who recused himself in matters related to the investigation by special counsel Robert Mueller of allegations Trump campaign aides colluded with Russian interests in the 2016 campaign.

“In May of 2016, then-candidate Trump put out his first list of potential Supreme Court nominees,” Booker said. “You weren’t on that list. In September of 2016, he put out a longer list and you weren’t on that one. Then in May of 2017, something incredible happened, Robert Mueller was appointed a special counsel to investigate any links and coordination between the Russian government and the Trump campaign. The president was now in jeopardy. He was the subject of a criminal investigation. And then President Trump puts out a third list of nominees, and your name is on that list.”

Kavanaugh wrote in a 2009 article for the Minnesota Law Review that presidents are immune from criminal investigation or prosecution while in office. Committee Democrats have claimed the article shows Kavanaugh believes Trump is immune from prosecution, but the nominee repeatedly argued he was making a policy comment, not a conclusion on constitutionality.

“The Justice Department for 45 years has taken the position and still does, that a sitting president may not be indicted while still in office.”

“My only loyalty is to the Constitution,” Kavanaugh said. “Two, the Justice Department for 45 years has taken the position and still does, that a sitting president may not be indicted while still in office. Three, I have not taken a position on the constitutionality and promise you I have an open mind on that question. And four, I did talk about a congressional proposal that was not enacted.”

Kavanaugh added that he would review such a case with an open mind if it ever came before him.

Who do you think would win the Presidency?

By completing the poll, you agree to receive emails from LifeZette, occasional offers from our partners and that you've read and agree to our privacy policy and legal statement.

He was questioned earlier in the hearing about his writing that the Morrison v. Olson case was wrongly decided. The U.S. Supreme Court determined that the Independent Counsel Act was constitutional when it ruled on the case in 1988.

Senate Democrats argued Kavanaugh’s Morrison comments showed he would not object if Trump fired Mueller. Kavanaugh responded that the Morrison case concerned the independent counsel system, which expired in 1999, and that the special counsel system is different.

Kavanaugh also said that the ruling in Morrison doesn’t impact the precedents that limit whom the president can fire, as indicated by the ruling in Humphrey’s Executor v. United States.

Related: Schumer Reaches for Kavanaugh Delay with Cohen Plea Deal

The special counsel investigation has also swept up former associates of the president in its probe. Paul Manafort, a former campaign manager, was convicted on eight counts related to bank and tax fraud. Michael Cohen, a former personal lawyer, pleaded guilty to facilitating two payments to keep women quiet about alleged affairs with Trump.

Kavanaugh is a self-described textualist, which, he explained, is a specific version of originalism. Kavanaugh has resisted the expansion of administrative agency power and has opposed judicial activism. He has decided recent cases based on what he refers to as the “major rules doctrine,” which states that Congress must clearly express if it wishes to assign an agency authority of vast economic and political significance.