President Trump’s nominee to the most influential federal appeals court clashed with Democrats over his past comments about the Affordable Care Act, while Republicans praised his recent ruling allowing limited Easter church services during the coronavirus pandemic.

Judge Justin Walker, a protege of Senate Majority Leader Mitch McConnell (R-Ky.) and Supreme Court Justice Brett M. Kavanaugh, faced criticism at Wednesday’s confirmation hearing over his remarks two years ago that rulings upholding the ACA were “indefensible” and about jokes he made at the law’s expense at a ceremony in March marking his entry to the federal bench.

Republicans are pushing to elevate Walker to the U.S. Court of Appeals for the District of Columbia Circuit — a promotion that Democrats decry as too quick for the 37-year-old after just six months as a district judge in Kentucky.

Democrats pointed to the early-March ceremony in which Walker spoke before a crowd that included McConnell, Kavanaugh and former justice Anthony M. Kennedy, for whom Walker served as law clerk when Kennedy was in the minority in a ruling upholding the ACA.

Walker defended his comments in March — that the “worst words” he ever had to deliver to Kennedy was that Chief Justice John G. Roberts Jr. sided with the liberal bloc, tipping the case — as a lighthearted joke trying to praise someone he considered a mentor.

“He has been an invaluable mentor and friend to me since I clerked for him in 2011 and 2012,” Walker said of Kennedy. “It was not meant as anything more than a reference to the dissent that he wrote, and again, a bit of a tongue-in-cheek allusion to the reality that no Supreme Court justice likes being in the dissent.”

Several Democrats tangled with Walker over his comments about the 2010 law, which has survived two major challenges in the Supreme Court and faces a third. The Trump administration is backing a lawsuit by GOP state officials that could gut the law, eliminating its insurance protections and coverage for tens of millions of Americans. A ruling is expected next year.

Against the backdrop of the coronavirus outbreak, Sen. Dianne Feinstein (D-Calif.), the top Democrat on the committee, said health-care groups have raised concerns that Walker’s confirmation could “exacerbate the health crisis in this country.”

Sen. Richard Blumenthal (D-Conn.) told Walker, “What I think is indefensible is that we are here in the midst of a public health crisis considering the nomination of someone who would dismantle a health-care system that is saving lives right now.”

With Republicans holding a 53-to-47 majority, Walker is on track to win Senate confirmation despite any Democratic opposition.

Walker served as a law clerk for Kavanaugh, when he was a judge on the D.C. Circuit, and then for Kennedy before his retirement.

Kennedy was replaced by Kavanaugh after a 2018 confirmation battle that included allegations of sexual assault when Kavanaugh was a high school student, an accusation he denied.

In Wednesday’s hearing, Walker embraced his close connection with Kavanaugh — whom he defended more than 160 times in the news media during the fight over his nomination to the Supreme Court — underscoring how remnants of the contentious confirmation battle in 2018 continue to linger in the Senate.

“As an academic and as a former clerk, I thought I knew about Justice Kavanaugh and his jurisprudence, and I wanted to share that knowledge with people who didn’t,” Walker told the committee.

Referring to Kavanaugh and Kennedy, the nominee said, “I will defend them both until the cows come home.”

The coronavirus played a central role in Wednesday’s hearing, physically and in terms of Walker’s legal opinions.

Rather than the usual cramped committee hearing room, on the second floor of the Dirksen Senate Office Building, the Judiciary Committee convened in a large room on the ground floor so senators and the witness could observe social distancing guidelines. Many senators appeared via video to question the nominee.

And Republicans sought to highlight Walker’s Easter-service ruling in Louisville, including Sen. Rand Paul (R-Ky.), who introduced him to the panel, and Sen. Lindsey O. Graham (R-S.C.), the chairman who used his first question to ask about the decision.

Last month, Walker blocked Louisville Mayor Greg Fischer (D) from forbidding drive-in church services on Easter to slow the spread of the coronavirus. McConnell and other conservatives hailed Walker’s decision.

“I had to make a decision and I had to make a decision quickly so that people could know on Saturday whether they could go to church on Easter Sunday,” Walker told Graham. “And looking at the law, it seemed to me that the free-exercise clause of the First Amendment prohibited the action that the mayor was taking.”

In that opinion, Walker wrote that Fischer had “criminalized the communal celebration of Easter,” adding that Fischer’s decision was “beyond all reason.”

Walker’s nomination received a surprise boost late Tuesday when the American Bar Association reversed its initial “Not Qualified” rating during his 2019 confirmation process for the post in the lower trial court, instead deeming him “Well Qualified” for this more prominent post.

The ABA said that its switch came from the differences between the courts, with the appellate court post placing less emphasis on trial experience and instead a “high degree of legal scholarship, academic talent, analytical and writing abilities, and overall excellence.”

The ABA said that although a nominee should have 12 years of experience in the practice of law, Walker’s varied accomplishments offset concerns about his brief time.

In remarks on the Senate floor Wednesday, McConnell highlighted Walker’s decision and the ABA rating.

“In the span of just a couple of weeks, almost simultaneously, Judge Walker has won praise from religious-freedom advocates, freedom advocates nationwide, and the approval of the ABA, which Democrats call the gold standard,” McConnell said. “That illustrates the kind of impressive individual that the committee is considering this morning.”

Democrats criticized Republicans for holding the hearing when instead they could have considered legislative issues related to the virus, ranging from the status of undocumented immigrants working on the health-care front lines to securing the elections this fall.

“The list is lengthy, and unfortunately it isn’t the reason we are returning this week,” said Sen. Richard J. Durbin (D-Ill.), a senior Democrat on the panel. “Instead, we are considering the nomination of a 37-year-old family friend of Senator McConnell’s to the second-highest court in the land.” Durbin called it ironic that Walker has “stridently” opposed the ACA at a time of a health-care pandemic.

Walker has long been eyed for a vacancy on the powerful appeals court. As he worked on Kavanaugh’s nomination, Walker also quietly interviewed for that opening in September 2018, according to documents filed with the Judiciary Committee.

That interview for Kavanaugh’s old job was first disclosed in his nomination papers submitted to the Senate last week for the D.C. Circuit vacancy. That interaction was not mentioned in his paperwork for the lower-court position in Kentucky. Walker’s allies say he did not have to disclose the circuit court interview, because he had been nominated for a different judicial vacancy.

Still, Feinstein asked Walker in follow-up written questions to describe his experience “during the entire judicial selection process, including communications you received between June 22, 2018 and March 7, 2019,” regarding Walker’s nomination to be a federal judge, and Walker did not include the September 2018 interview, according to committee documents.

If confirmed, Walker would not tip the ideological balance of the D.C. court, which considers many of the most contentious constitutional clashes involving the federal government, sometimes having the final word on key legal matters if the Supreme Court does not take up the case.

Walker would replace retiring judge Thomas B. Griffith, 65, who issued a statement Tuesday declaring that he faced no political pressure to step down so that someone much younger could be confirmed to the influential court.

The “sole reason,” Griffith said, was his wife’s health and the need to care for her, a move he decided on last June and kept private among his family, law clerks and close friends.

For more than three years, McConnell has moved at a rapid tempo to fill the judicial openings inherited by Trump after the GOP Senate leader refused to act on dozens of President Barack Obama’s nominees, most notably Supreme Court nominee Merrick Garland, who has served on the D.C. Circuit since 1997.

McConnell has vowed to leave no vacancy behind as the president faces reelection this November and Senate Republicans face the risk of losing control of the chamber.

Ann Marimow contributed to this report.