The US Supreme Court is considering whether a civil rights law that bars workplace discrimination applies to gay and transgender workers.
It is hearing two cases of alleged discrimination against gay employees, and a third involving transgender discrimination.
Protesters from both sides gathered outside the court as arguments began.
The cases may be a landmark for LGBT rights in the US, four years after gay marriage became legal nationwide.
Decisions from the nine justices on America’s highest court are due by next June.
What are the cases?
The first two cases have been consolidated as both address the purported discrimination of gay employees.
Donald Zarda, a skydiving instructor from New York, and Gerald Bostock, a former child welfare services co-ordinator from Georgia, both say they were fired because of their sexual orientation.
Mr Zarda, who died in 2014, was dismissed after joking with a female client with whom he was tandem-diving not to worry about the close physical contact because he was “100% gay”.
The company maintained he was fired because he shared personal information with a client, not because he was gay, but a court in New York ruled in Mr Zarda’s favour.
Mr Bostock says he lost his job after joining a gay recreational softball league, thereby publicly revealing his sexual orientation.
His employer, Clayton County, said his dismissal was the result of “conduct unbecoming of a county employee”.
Mr Bostock lost his discrimination case in a federal court in Atlanta.
Michigan funeral home employee Aimee Stephens says she was fired for coming out as transgender.
She had worked as Anthony Stephens for six years before writing a letter to colleagues saying she would return to work “as my true self, Aimee Australia Stephens, in appropriate business attire”.
Two weeks later, Ms Stephens was fired for insisting to work in women’s clothes.
In a court filing last year, the funeral home owner argued it wanted Ms Stephens to comply with a dress code “applicable to Stephens’ biological sex”.
A lower court sided with Ms Stephens.
The US Department of Justice under President Donald Trump has supported the employers in each case.
What’s the legal background?
Title VII of the Civil Rights Act of 1964 forbids employers from discriminating against employees on the basis of sex as well as gender, race, colour, national origin and religion.
The legal arguments hinge on whether “sex” may apply to sexual orientation and gender identity.
So far, most federal appeals courts in the US have interpreted the law to exclude discrimination against lesbian, gay, bisexual and transgender people.
But two courts, in New York and Chicago, recently ruled that discrimination against LGBT people is a form of sex discrimination.
What happened in court?
The Supreme Court justices appeared divided on Tuesday on whether Title VII protects gay, lesbian and transgender employees.
Conservative Justice Samuel Alito said that if the provision is found to cover LGBT individuals, the court would be seen as deciding “a major policy question” – taking the place of the legislature.
Chief Justice John Roberts is seen as a possible swing vote on the issue.
He asked on Tuesday whether, if the court were to rule that sexual orientation is covered by Title VII, exemptions would be granted for employers with strong religious beliefs.
It is the first time the top US court has heard a case involving gay rights since 2018.
Since then the balance of the court has tilted to a 5-4 conservative majority, including Trump appointees Justice Neil Gorsuch and Justice Brett Kavanaugh.
On Tuesday, Mr Gorsuch voiced sympathy for the fired workers, saying sex seemed to be a “contributing cause” for their dismissals.
But, echoing Mr Alito, he later warned of “massive social upheaval” if the court were to rule in favour of LGBT workers, instead of allowing Congress to legislate on the subject.
ara McKelvey, BBC News, at the scene
Dozens of people demonstrated outside the Supreme Court building, holding signs that say: “Trans people belong”, “We will fight back” and other slogans that underscore their message: gay and transgender rights should be protected in the workplace.
The issue being considered by the court has important legal implications, as activists explain, saying no-one should be sacked for being gay. The matter also has political implications: evangelical Christians, many of whom helped Trump get elected, think the laws should not change and are hoping the court will agree.
For Trump, the ruling will either provide a victory or a setback for his supporters. The progressive activists are naturally campaigning for a victory for their side. With that goal in mind, one activist is holding a sign: “Surrender Donald.”