The US Supreme Court delivered a landmark victory for the gay and transgender communities on Monday when it ruled that employers cannot discriminate against workers because of their sexual orientation.
In a blow to the administration of President Donald Trump, the court ruled by six votes to three that Title VII of the Civil Rights Act of 1964, which outlaws discrimination against employees because of a person's sex, also covers sexual orientation and transgender status.
"Today we must decide whether someone can be fired simply for being homosexual or transgender," the court said. "The answer is clear."
"This is a huge victory for LGBTQ equality," said James Esseks, director of the American Civil Liberties Union's LGBTQ & HIV Project.
The group uses the longer version of the acronym, in which the Q stands for "questioning" - as in still exploring one's sexuality - or "queer."
"The court has caught up to the majority of our country, which already knows that discriminating against LGBTQ people is both unfair and against the law," he said in a statement.
The decision was hailed by Joe Biden, the Democratic nominee for president, as "a momentous step forward for our country."
"Before today, in more than half of states, LGBTQ+ people could get married one day and be fired from their job the next day under state law, simply because of who they are or who they love," said Biden, who was vice president when the court made its historic ruling in favor of same-sex marriage in 2015.
"There is no question: LGBTQ people are protected from discrimination in the workplace," the union said in a tweet, using an acronym for gay, lesbian, bisexual, transgender and queer people.
Mr Bostock was fired from his long-held job in the state of Georgia as a child welfare services co-ordinator after he joined a gay sports club.
But rights activists had feared that the appointment by Mr Trump of two new conservative judges to the top court could hinder further wins for their cause.
Yet it was one of them, Neil Gorsuch, who wrote the majority decision, joining with the court's four progressive-leaning judges and Chief Justice John Roberts.
"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. Sex plays a necessary and undisguisable role in the decision, exactly what Title VII forbids," Mr Gorsuch wrote.
"Those who adopted the Civil Rights Act might not have anticipated their work would lead to this particular result," Gorsuch said.
"But the limits of the drafters' imagination supply no reason to ignore the law's demands."
'Fired for coming out'
The ruling was a blow for the Trump administration, which had effectively thrown in its lot with employers.
"Sex refers to whether you were born woman or man, not your sexual orientation or gender identity," argued Solicitor General Noel Francisco, representing the government's position before the court. He said it was the job of Congress to update the law, not the justice system.
That position was echoed by Brett Kavanaugh, the other conservative judge appointed by Mr Trump.
Despite his opposition, Mr Kavanaugh wrote in his own separate dissent that the decision still represented an "important victory achieved today by gay and lesbian Americans."
Donna Stephens, the wife of transgender plaintiff Aimee Stephens who died last month, hailed her late partner's struggle for justice after being sacked by a Detroit funeral parlor when she came out.

A file photo of supporters of LGBT rights staging a protest on the street in front of the US Supreme Court in Washington. Source: AAP
"For the last seven years of Aimee's life, she rose as a leader who fought against discrimination against transgender people, starting when she was fired for coming out as a woman, despite her recent promotion at the time.
"I am grateful for this victory to honor the legacy of Aimee, and to ensure people are treated fairly regardless of their sexual orientation or gender identity," she said in a statement after the court pronounced its ruling.
The decision was hailed by many Democratic leaders, including Pete Buttigieg, the former Army officer and mayor who became the first openly gay person to run for the Democratic presidential nomination.
"It was only 11 years ago this summer that I took an oath and accepted a job that I would have lost, if my chain of command learned that I was gay. Firing us wasn't just permitted - it was policy," he said.
Pop superstar Taylor Swift also lauded the decision, tweeting, "We still have a long way to go to reach equality, but this is a beautiful step forward."