My first job after college was teaching math in North Carolina in 1990. My students were wonderful, awkward high schoolers. I have fond memories from that time.

Unfortunately, my starkest memory is of learning that I was hired to replace a teacher who had been fired for being gay. I was still in the closet myself. Learning this kept me there.

At the time, the school was well within its legal rights. But that presumably changed last year, when the Supreme Court ruled in Bostock v. Clayton County that an employer who fires an individual for being gay or transgender violates Title VII of the Civil Rights Act of 1964. That law bans discrimination based on sex and, according to the opinion written by Justice Neil Gorsuch, "it is impossible to discriminate against a person for being homosexual or transgender without discriminating against that individual based on sex."

At the time of that ruling, 26 states still allowed such discrimination due to the lack of any protections for LGBTQ people in state law.

The Bostock ruling meant dozens of other federal laws that also prohibit sex discrimination might now be interpreted to include LGBTQ equality, including Title IX, the Affordable Care Act, Fair Housing Act and the Family Medical Leave Act. I was heartened to think my experience of replacing a fired gay teacher might never happen again. The Biden administration expanded the Bostock ruling to these other statutes that prohibit sex discrimination to include LGBTQ individuals.

But the Supreme Court quickly also signaled last year that these new anti-discrimination protections may be limited by certain religious exceptions. In Our Lady of Guadalupe School v. Morrissey-Berru, the court expanded the ministerial exception to anti-discrimination law to include Catholic schoolteachers. Because they were teaching religious principles to students, the court held they were like a minister.

Many LGBTQ activists were worried that the court would continue to limit the application of nondiscrimination laws in a case the Supreme Court decided last week. In Fulton v. City of Philadelphia, the court examined whether First Amendment religious protections override anti-discrimination laws designed to protect LGBTQ couples.

The case involved a Catholic services organization that would not place foster children into homes of LGBTQ couples because doing so would violate the organization's religious beliefs. Philadelphia ended its contract with the Catholic organization because it was violating the city's anti-discrimination laws that protected LGBTQ residents.

The Catholic services organization subsequently sued, claiming cancellation of the contract violated its First Amendment rights.

In a blow to the LGBTQ community, the Supreme Court unanimously sided with the Catholic services organization. The court did so on very limited grounds. Because Philadelphia allowed other kinds of exemptions to its anti-discrimination laws, it was treating the Catholic organization differently, the court held, thus violating its First Amendment rights.

The court's majority opinion did not decide the broader question of whether First Amendment rights can override anti-discrimination laws that conflict with sincerely held religious beliefs.

I still believe the court will eventually expand religious liberty exceptions to allow people to discriminate against LGBTQ people based on religious beliefs. Although the majority opinion in Fulton ruled on very narrow grounds, a majority of justices, through concurring opinions, expressed a willingness to take a more expansive view of religious liberty that would override anti-discrimination laws, especially those meant to protect LGBTQ individuals.

The Fulton opinion shows that we are likely in store for years of opinions that chip away at the grander arguments behind Bostock.

Will the gains in LGBTQ rights over the past decade — especially protections against discrimination — take a back seat in the next decade to religious liberties that grant the ability to discriminate? We didn't get a definitive answer on Thursday, but the signs are that might be what's coming.

Anthony Niedwiecki is president and dean of Mitchell Hamline School of Law in St. Paul, the first openly LGBTQ person in that position.