WASHINGTON — Former Nixon White House counsel John Dean said Friday that if Supreme Court nominee Brett Kavanaugh is confirmed, and the president were to shoot someone on New York’s Fifth Avenue — as President Trump joked in 2016 he could safely do — that president would be immune from consequences while they occupied the White House.

“Under Judge Kavanaugh’s recommendation, if a president shot somebody in cold blood on Fifth Avenue, that president could not be prosecuted while in office,” Dean, a key witness in the Watergate hearings, testified before the Senate Judiciary Committee Friday.

Dean, who was among the witnesses called by Democrats on the committee to testify at the fourth and final day of the Kavanaugh confirmation hearings this week, served as Nixon’s White House counsel from 1970 to 1973. He became the first administration official to testify before Congress a few months later and claim that Nixon was directly involved in the Watergate cover-up.

Sen. Richard Blumenthal, D-Conn., said to Dean Friday, "There is now arguably a cancer on the presidency as malignant and metastasizing as there was [during Watergate]. Correct?"

"Yes, I would agree with that," Dean said.

Nixon, said Dean, "left because the man at his core had a respect for the rule of law" while Trump "could care less about the rule of law."

In testimony to the Judiciary Committee on Friday, Dean said that if Kavanaugh joined the high court, “it will be the most presidential powers-friendly court in the modern era.”

Kavanaugh has a broad view of presidential powers, Dean argued, which he said includes having the Congress immunize sitting presidents from both civil and criminal liability. Dean added that he’s still unclear whether Kavanaugh believes United States v. Nixon was correctly decided after his two days of congressional testimony this week.

Dean, who also testified at the confirmation hearing for now-Chief Justice John Roberts in 2005, said that Kavanaugh has not been truly vetted, pointing to the large numbers of documents that are being withheld from the Senate and the public. He said that there was an “across-the-board failure” by the Senate to fully vet former Justice William Rehnquist and current Justice Clarence Thomas when they were both nominees that wound up haunting their careers.

“Because of the withholding of documents, Judge Kavanaugh may be traveling the same path as Rehnquist and Thomas,” Dean said Friday. “Frankly, I’m surprised that Judge Kavanaugh is not demanding that every document that he ever handled be reviewed by this committee — unless, of course, there’s something to hide.”

Kavanaugh faced 13-hour days of questioning from the committee on Wednesday and again on Thursday. Many Democrats have expressed concern with his answers, particularly regarding his views on executive power.