U.S. Supreme Court Associate Justice Samuel Anthony Alito Jr. on Thursday criticized the high court's 2015 same-sex marriage ruling.

Obergefell v. Hodges struck down state laws and constitutional amendments that defined marriage as a heterosexual union.

Alito's virtual appearance at the 2020 National Lawyers Convention was sponsored by the Federalist Society, an organization of conservatives that advocates for a textualist interpretation of the U.S. Constitution.

“Religious liberty is fast becoming a disfavored right,” Alito told the virtual crowd before giving examples of cases that reached the high court, including Masterpiece Cakeshop, the 2018 case that involved a Colorado bakery owner refusing to provide a cake to a gay couple celebrating their out-of-state wedding based on his religious beliefs.

Alito said that there was no evidence that Jack Phillips' decision to refuse to make the cake had harmed anyone.

“As far as I'm aware … [there is] no reason to think Jack Phillips' stand would deprive any same-sex couple of a wedding cake,” Alito said. “The couple that came to his shop was given a free cake by another bakery and celebrity chefs have jumped to the couple's defense.”

Alito also said that freedom of speech was under attack, stating that employees at “many big corporations” could not say that marriage “is a union between one man and one woman.”

“Until very recently that's what the vast majority of Americans thought. Now it's considered bigotry. That this would happen after our decision in Obergefell should not have come as a surprise,” he said, adding that the dissenters in the opinion predicted it.

“One of the great challenges before the Supreme Court going forward will be to protect freedom of speech.”

Alito also criticized restrictions aimed at slowing the spread of coronavirus, saying that “COVID rules have restricted speech in unprecedented ways.”