When a public official says he is pessimistic that his comments won’t be twisted or misunderstood but then adds, “here goes,” even he knows something controversial is coming up.

That’s how Supreme Court Justice Samuel A. Alito Jr. began his rock-ribbed and unusual speech to the Federalist Society on Thursday night. He recited “previously unimaginable” pandemic-related restrictions on individual freedoms and lamented that freedom of speech, religion and gun rights are in danger of “second-tier” constitutional status.

He delivered a brushback to liberal Democratic senators who have criticized the court. He renewed grievances with his colleagues — Chief Justice John G. Roberts Jr. was an implied offender — about decisions on abortion rights and deferring to public officials who limit the size of worship services as preventive measures aimed at abating the spread of coronavirus.

Same-sex marriage? Check. These days, “you can’t say that marriage is a union between one man and one woman” without fear of reprisal from schools, government and employers, Alito said.

“Until very recently, that’s what the vast majority of Americans thought. Now it’s considered bigotry,” he said, adding: “One of the great challenges for the Supreme Court going forward will be to protect freedom of speech.”

It was an address that chronicled Alito’s disappointments with the Supreme Court that had a 5 to 4 conservative majority until recently. Maybe it was to set an agenda for one with a new and perhaps more reliable 6 to 3 margin.

Alito’s positions on the issues are not new, much of what he said was recycled from dissents and opinions he has written. But speeches to an audience by a Supreme Court justice are rare, and the 30-minute lecture by Alito, apparently aided by a teleprompter and in front of a plain, blue background, made an impact.

Liberals howled on social media that it was a partisan speech better suited to a political convention than a legal society. Conservatives used to make similar complaints about Justice Ruth Bader Ginsburg, who usually was candid in answering questions from interviewers.

An address by one of the Supreme Court’s conservatives is a now-standard highlight of the Federalist Society’s national lawyers convention. Last year there was a celebratory, black-tie event at Washington’s Union Station featuring Justice Brett M. Kavanaugh; this year’s was held online, because of the pandemic.

A majority of the Supreme Court justices are active “FedSoc” members, and an overwhelming number of President Trump’s record-breaking nominees to the federal judiciary have ties to the organization.

But Alito, 70, who joined the court in 2006 after being nominated by President George W. Bush, was far from lighthearted. His message was foreboding.

The statement he worried would be “twisted” was this: “The pandemic has resulted in previously unimaginable restrictions on individual liberty.”

Alito stressed he was not trying to diminish the “severity of the virus’s threat to public health” or even whether the restrictions are good policy.

Justice Samuel A. Alito Jr. said Nov. 12 that restrictions put in place to curb the coronavirus pandemic were "previously unimaginable." (The Federalist Society/AP)

But he called it an “indisputable statement of fact” that “we have never before seen restrictions as severe, extensive and prolonged as those experienced for most of 2020.”

“Whatever one may think about the covid restrictions, we surely don’t want them to become a recurring feature after the pandemic has passed,” he said, referring to the potentially lethal disease that coronavirus causes.

Foremost, he said, is their effect on religious practice, and he indicated the court this summer had not properly weighed those constitutional rights when upholding local restrictions in California and Nevada regarding houses of worship.

Roberts was key to those decisions. The chief justice said they did not undermine the free exercise of religion, and that protecting public health is entrusted to local officials and should “not be subject to second-guessing by an unelected federal judiciary, which lacks the background, competence, and expertise to assess public health and is not accountable to the people.”

Alito said the experience in Nevada put commerce above religion. A decision by the state’s Democratic governor, Steve Sisolak, to limit church attendance to 50 people while reopening the state’s massive casinos to a 50 percent occupancy meant that the 51st person in line to worship was “out of luck,” the justice said.

“Head for the slot machines or maybe a Cirque du Soleil show” was the message, Alito said.

“It pains me to say this but in certain quarters, religious liberty is fast becoming a disfavored right,” he added.

But that doesn’t seem true at the high court, where religious conservatives have been on a winning streak. And Alito’s remarks came on the day the court received a request from the Roman Catholic Diocese of Brooklyn seeking relief from restrictions imposed by New York Gov. Andrew M. Cuomo, a Democrat.

It might command a different reception from the court: Ginsburg, a member of the majority in the previous cases, has been replaced by Justice Amy Coney Barrett, one of Trump’s conservative choices.

Gun rights was another issue receiving second-class treatment, Alito said. He indicated he is still sore about the court’s decision to declare moot a case from New York about transporting a gun that promised to be the court’s first examination of the Second Amendment in a decade.

New York changed the law before the court could act, and an amicus brief filed by Sen. Sheldon Whitehouse (D-R.I.) and other Democrats said it would reflect poorly on the court and verify a view of it as a “sick” institution if it continued to hear the case.

The Whitehouse brief was criticized even by some Democrats as too threatening, and Alito called it “an affront to the Constitution and the rule of law.”

“This little episode, I am afraid, may provide a foretaste of what the Supreme Court will face in the future,” Alito said, and he offered the senators a lesson.

“Let’s go back to some basics: The Supreme Court was created by the Constitution, not by Congress, and under the Constitution we exercise the judicial power of the United States,” he said. “Congress has no right to interfere with that work any more than we have the right to legislate.”