There was a crowd of protesters outside, and a few inside. Those attending the Federalist Society’s gala Thursday night at Washington’s Union Station were greeted by a large video screen on a truck out front, which played on a loop the Senate testimony of Christine Blasey Ford accusing Brett M. Kavanaugh of sexual assault when the two were teenagers.

But before a crowd of more than 2,000 supporters, there were standing ovations for the newest justice and for his wife, Ashley, and a message from Kavanaugh that he said could be summed up in one word: “gratitude.”

“I will always be grateful,” Kavanaugh said at the end of a 30-minute speech that was mostly a long thank-you note — to his fellow justices, his teachers, his family, his priests, the Washington Nationals, his friends.

“I will always be on the sunrise side of the mountain. I will always be not afraid.”

The speech was something of a public coming-out for Kavanaugh after the bitterly partisan confirmation hearing last fall in which the Republican-controlled Senate had just enough votes to confirm him after Ford’s accusations.

Since then, he has spoken publicly only to a gathering of judges and lawyers and taught a summer class overseas for the Antonin Scalia Law School at George Mason University.

It was the perfect setting for him in front of the conservative legal establishment that championed his nomination. The Federalist Society has played an instrumental role in President Trump’s record-breaking transformation of the federal judiciary. Both Kavanaugh and Trump’s other nominee to the high court — Justice Neil M. Gorsuch — are longtime Federalist Society favorites.

The group gave him a minute-long standing ovation, and ramped up the applause when some protesters who had slipped inside the hall began blowing whistles. The liberal group Demand Justice had thought up the truck video that replayed Ford’s testimony, and outside there were chants of “Impeach Kavanaugh.” Kavanaugh has vehemently denied the accusation.

There was no video allowed inside, and the public’s last image of Kavanaugh is likely his angry, tearful rebuttal of Ford’s accusations. Or perhaps actor Matt Damon’s “Saturday Night Live” sendup of Kavanaugh’s explosive testimony, which has been viewed nearly 26 million times on YouTube. Kavanaugh alluded to it when he got choked up talking about his daughter Liza, who has suggested praying for Ford.

“Matt Damon would have made it through this,” Kavanaugh said.

Kavanaugh praised each of his fellow justices by name — his “friend Elena Kagan” and Ruth Bader Ginsburg, who he said is an “inspiration.” “A team of nine with a superb and wise chief justice,” he said.

He joked about Gorsuch, whom he has known since he was a teenager and with whom he clerked for Justice Anthony M. Kennedy.

He said that after he wrote his first opinion for the court, he got a note from Kennedy that he will always treasure. “I like this better than Neil’s first opinion,” Kavanaugh said. He added: “That’s called brotherly humor.”

And he made a joke, as the junior justice always does, about serving on the court’s cafeteria committee. He said that, within a few weeks, diners will be able to get pizza there. Because there is no such thing as bad pizza, he said, “my legacy is secure.”

But the jokes aside, the protests outside showed the uphill climb Kavanaugh faces in the public’s eye.

A recent poll showed Kavanaugh and Ginsburg were the most well-known members of the court. But while Ginsburg was lauded by respondents, Kavanaugh’s favorable rating was underwater.

On the court, things have been different. Kavanaugh has been well-received by his colleagues and is known as a gracious questioner of the lawyers who come before him.

In the term that ended in June, Kavanaugh was in the majority of the court’s decisions more than any other justice. He agreed with some of the court’s liberal members almost as much as he agreed with some of the court’s conservatives, including Gorsuch.

Such evenhandedness has brought grumbles from some conservatives about what they consider Kavanaugh’s go-slow approach. He has balanced that by voting in favor of every important Trump administration initiative that has reached the court during his tenure.

Ginsburg, as the senior justice in the majority, picked Kavanaugh to write the court’s high-profile opinion saying an antitrust lawsuit against Apple could move forward. (Gorsuch wrote the dissent.)

At speaking events this summer, Ginsburg praised Kavanaugh for hiring only female clerks for his initial term, which for the first time meant that more women than men filled the prestigious jobs.

Justice Sonia Sotomayor and Kagan have sidestepped questions about Kavanaugh and the allegations against him.

“We are all human beings, we all have pasts,” Sotomayor told a judicial conference in Santa Fe earlier this year. “Now, whether things occurred or didn’t occur, all of that is irrelevant. It is yesterday, today is today, and moving forward, I have to work with him.”

Other liberals have not been as forgiving, and the speech in front of the Federalist Society renewed criticism.

Sen. Sheldon Whitehouse, (D-R.I.), one of the court’s most consistent critics, recalled former White House counsel Donald McGahn’s response to claims the White House had “outsourced” the selection of judges to the society.

“I’ve been a member of the Federalist Society since law school — still am,” McGahn said. “So frankly, it seems like it’s been in-sourced.”

In a statement, Whitehouse said: “A private organization funded by anonymous donors having an improper role in the selection of judges and justices is bad enough. A Supreme Court justice returning favors to that organization is even worse. The court needs an ethics code.”