The US Supreme Court ruled Monday that employers who fire an individual for being gay or transgender violate Title VII of the Civil Rights Act of 1964.

In Bostock v. Clayton County, Georgia, the 6-3 majority opinion said an employer violates Title VII when it intentionally fires an individual employee based in part on sex. Even if there are other reasons for a dismissal, if the employee’s sex is factored into that decision to discharge the employee, that is still a violation, the court ruled.

Employers with 15 employees or more, including contingent workers, must comply with Title VII. As with any aspect of Title VII, buyer organizations cannot discriminate against contingent workers on the basis of their race, color, religion, sex or national origin, and cannot ask their suppliers to do so on their behalf.

“Discrimination on the basis of homosexuality or transgender status requires an employer to intentionally treat individual employees differently because of their sex,” wrote Justice Neil Gorsuch in the majority opinion. “There is no escaping the role intent plays: Just as sex is necessarily a but-for cause when an employer discriminates against homosexual or transgender employees, an employer who discriminates on these grounds inescapably intends to rely on sex in its decision-making.”

Until Monday’s decision, it was legal in more than half of the states to fire workers for being gay, bisexual or transgender, the New York Times reported. The decision extended workplace protections to millions of people across the nation.

The case involved three workers who were separately fired for being gay or transsexual:

  • Gerald Bostock, who in 2013 was fired by Clayton County, Georgia, for conduct “unbecoming” a county employee shortly after he began participating in a gay recreational softball league.
  • Donald Zarda, who was fired by Altitude Express in 2010, days after he mentioned being gay.
  • Aimee Stephens, who presented as a male when hired by R. G. & G. R. Harris Funeral Homes, but then was fired in 2013 after informing her employer that she planned to “live and work full-time as a woman.”

Each employee sued alleging sex discrimination under Title VII of the Civil Rights Act of 1964. Bostick’s case was dismissed by the Eleventh Circuit, while the Second and Sixth Circuits allowed Zarda’s and Stephens’ cases, respectively, to proceed.

“Monday’s opinion will have a long-term impact on employers who are subject to Title VII – those having 15 or more employees,” said Elaine Turner, a shareholder/partner at the national law firm Hall Estill with more than 30 years’ experience in US labor law. “Regardless of contrary state laws, such employers may not discriminate against individuals in employment decisions because they are gay or transgender. Those that do violate Title VII are subject to legal actions against them that could be very costly,” Turner says.

The decision is a posthumous victory for two plaintiffs, The New Yorker reports: Stephens died May 12 of kidney disease; Zarda died in a BASE-jumping accident in 2014.