The top court in the US has ruled that employers who fire workers for being gay or transgender are breaking the country's civil rights laws.
In a 6-3 decision, the Supreme Court said federal law, which prohibits discrimination based on sex, should be understood to include sexual orientation and gender identity.
The ruling is a major win for LGBT workers and their allies. And it comes even though the court has become more conservative.
Lawyers for the employers had argued that the authors of the 1964 Civil Rights Act had not intended it to apply to cases involving sexual orientation and gender identity. The Trump administration sided with that argument.
But Judge Neil Gorsuch, who was nominated to the court by President Donald Trump, said acting against an employee on those grounds necessarily takes sex into account.
"An employer who fires an individual for being homosexual or transgender fires that person for traits or actions it would not have questioned in members of a different sex," he wrote.
Members of the LGBT community across the US were celebrating on hearing the news.
Today's Supreme Court ruling brought me to tears. As a gay man lucky enough to live in California and originally come from New York I've never had to personally worry about losing a job or not being hired simply because of my sexual orientation.
But as a financial adviser working with clients all around the country for over 30 years, I've heard countless stories of people who have lost their jobs simply for being gay. It's angered and saddened me for so long.
For years now, I have been speaking at seminars or with friends and family about how in this day and age it's still perfectly legal to fire someone just because they're gay. Many people didn't believe me. Until today.
What does the ruling mean?
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.
Under the Obama administration, the federal Equal Employment Opportunity Commission, which enforces the anti-discrimination law, said it included gender identity and sexual orientation. But the Trump administration has moved to roll back some protections in healthcare and other areas.
While some states in the US had already explicitly extended such protections to LGBT workers, many have not.