Supreme Court nominee Brett M. Kavanaugh walked a familiar tightrope last week at his confirmation hearing: professing an open mind to the liberal senators who surely will oppose him anyway but giving no reason for the Republican majority to doubt that he would be a stalwart on a more consistently conservative high court.

Senate Majority Leader Mitch McConnell (R-Ky.), on a path to make a transformation of the Supreme Court and federal judiciary the legacy of his tenure, flatly declared that Kavanaugh, 53, would be in place when the justices begin their new term Oct. 1.

“Judge Kavanaugh’s judicial temperament and brilliance were on full display during this week’s hearings,” McConnell tweeted Friday. “He will make an excellent Supreme Court Justice.”

Democrats, who say the fight is not over, aggressively questioned Kavanaugh’s honesty, reviving disputes about what they say were misleading statements made when the former George W. Bush White House lawyer was confirmed to the U.S. Court of Appeals for the D.C. Circuit in 2006.

They criticized the Republican push to elevate Kavanaugh without a full rendering of his White House records. They claimed his nomination — more important than most because he would be replacing the pivotal member of the Supreme Court, Justice Anthony M. Kennedy — imperiled long-held precedents on abortion, gun control and curbs on presidential power.

But by the close of the four-day hearings, some Democrats on the Senate Judiciary Committee seemed resigned to Kavanaugh’s confirmation.

“I pray that I misjudged him and in fact he will, as a justice if confirmed, follow precedent more closely,” said Sen. Christopher A. Coons (Del.). “But obviously I’m gravely concerned about that, based on his long and established record.”

Those sorts of concerns are hardly unique to Kavanaugh.

Nominees of presidents from both parties, selected for their ideology as much as their legal brilliance, move toward the center for their first — and usually last — extended moment on the national stage.

In his buoyant but cautious star turn, Kavanaugh was no different. He picked his way through Supreme Court precedents, endorsing those he figured favorable to his chances and refusing to say whether a multitude of others were rightly or wrongly decided.

He avoided any criticism of the man who chose him, President Trump. He demurred even when asked if he agreed with Trump that there was wrong committed by both sides at the white-nationalist rally in Charlottesville.

He heeded his own advice, given as a young White House lawyer for a nominee facing confirmation for a lower court:

“She should not talk about her views on specific policy or legal issues,” he wrote in a 2003 memo that was released after Democratic senators protested it was being withheld by committee Republicans.

“She should say that she has a commitment to follow Supreme Court precedent, that she understands and appreciates the role of a circuit judge, that she will adhere to statutory text, that she has no ideological agenda.”

Republican senators, with a couple of exceptions regarding presidential powers, rarely contested Kavanaugh’s views or extensive record of judicial opinions. He was on guard when Democrats had the microphones and tried to placate some of their concerns with empathetic words.

At the end of one marathon day of questioning, Kavanaugh indicated he would not fire an employee if he discovered the person was gay.

“Senator, in my workplace, I hire people because of their talent and abilities,” he told Sen. Cory Booker (D-N.J.).

Kavanaugh listened with a sympathetic expression as Sen. Richard Blumenthal (D-Conn.) described the gruesome scene of children massacred by a gunman at Sandy Hook Elementary School six years ago. Blumenthal questioned the legal analysis Kavanaugh used to conclude that it was likely unconstitutional for local jurisdictions to ban what they call assault weapons.

“If someone came to me and argued that the test was wrong, I will, of course — of course, I always would listen and try to understand,” Kavanaugh said.

When Sen. Dianne Feinstein (D-Calif.) lamented the women who had died after illegal abortions before a right to the procedure was guaranteed by Roe v. Wade, Kavanaugh said he got it.

“I don’t live in a bubble,” the judge said. “I understand — I live in the real world.”

But then:

Kavanaugh would not state whether it would be wrong for other employers to fire gay workers, saying that was an issue likely to come before the Supreme Court soon. More than half the states have no such protection. He also declined to say whether it was “morally” wrong.

The judge seemed pretty confident that he was right about the Second Amendment even though he is in the minority, and that other judges who have disagreed with him on the subject are wrong.

He refused repeated attempts over about 24 hours of questions to say that Roe was correctly decided, only that it was “settled law,” reaffirmed by the Supreme Court in subsequent opinions.

Kavanaugh’s formulation was questioned by Democrats because of another email he wrote as a White House associate counsel, which had also been withheld by the committee. He edited out of a proposed op-ed supporting a judicial nominee a similar reference to Roe as something legal scholars agree is settled law.

“I am not sure that all legal scholars refer to Roe as the settled law of the land at the Supreme Court level since Court can always overrule its precedent, and three current Justices on the Court would do so,” Kavanaugh wrote in 2003.

Although the “settled law” portion of the sentence got the attention at the hearings, it is the second part that shows the difficulty senators have when vetting Supreme Court nominees.

It takes only five of the court’s nine justices to overturn one of the court’s long-standing precedents — or to create a new one — and it is impossible at a nomination hearing to determine whether the person will do so.

There are plenty of examples on both sides. At her confirmation hearing, for instance, Sonia Sotomayor used the familiar label of settled law to describe the court’s landmark decision that the Second Amendment protects an individual right to gun ownership. It struck down a law by the District of Columbia, a federal enclave, that severely restricted handgun ownership.

In her first year on the court, she was a dissenter when fellow justices ruled that the Second Amendment right also applied to laws passed by states and municipalities. She joined a dissent disagreeing with the key holding of Heller.

Elena Kagan, at her confirmation to be President Barack Obama’s solicitor general, told senators that there was no federal constitutional right for same-sex couples to marry. At her Supreme Court confirmation, she declined to answer whether she still believed that, saying it was an issue that would likely come before the court.

When it did, Kagan joined the majority to find that gay couples did have the right. It was written by Kennedy, and now Kavanaugh is the one declining to comment on whether that was a correct decision.

There is a fresher example than those.

It was easy to lose count of how many times Neil M. Gorsuch, Trump’s first Supreme Court nominee, cited allegiance to precedent at his 2017 confirmation hearings. He told senators he had contributed to a book on the subject.

“You start with a heavy, heavy presumption in favor of precedent in our system,” he told senators.

But in his first full term on the court, Gorsuch voted twice to overturn precedent, including a 41-year-old Supreme Court decision concerning public employee union dues.

In addition, he joined a one-paragraph concurrence by Justice Clarence Thomas that said the Voting Rights Act does not cover redistricting. Many Supreme Court decisions have held the opposite.

Such a view would have been highly controversial if made by a Supreme Court nominee rather than a justice with life tenure.