WASHINGTON (AP) — The Supreme Court ruled Monday that a landmark civil rights law protects LGBT people from discrimination in employment, a resounding victory for LGBT rights from a conservative court.

The court decided by a 6-3 vote that a key provision of the Civil Rights Act of 1964 known as Title VII that bars job discrimination because of sex, among other reasons, encompasses bias against LGBT workers.

“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,” Justice Neil Gorsuch wrote for the court.

Justices Samuel Alito, Brett Kavanaugh and Clarence Thomas dissented.

“The Court tries to convince readers that it is merely enforcing the terms of the statute, but that is preposterous. Even as understood today, the concept of discrimination because of ‘sex’ is different from discrimination because of ‘sexual orientation’ or ‘gender identity,’” Alito wrote in a dissent that was joined by Thomas.

The outcome is expected to have a big impact for the estimated 8.1 million LGBT workers across the country because most states don’t protect them from workplace discrimination. An estimated 11.3 million LGBT people live in the U.S., according to the Williams Institute at the UCLA law school.

The cases were the court’s first on LGBT rights since Justice Anthony Kennedy’s retirement and replacement by Kavanaugh. Kennedy was a voice for gay rights and the author of the landmark ruling in 2015 that made same-sex marriage legal throughout the United States. Kavanaugh generally is regarded as more conservative.