The US Supreme Court has ruled that a landmark civil rights law protects gay, lesbian and transgender 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, which bars job discrimination because of sex, among other reasons, encompasses bias against people because of their sexual orientation or gender identity.

“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,” Justice Neil Gorsuch wrote for the court. “Sex plays a necessary and undisguisable role in the decision, exactly what Title VII forbids.”

Members of the US Supreme Court
Members of the US Supreme Court (J Scott Applewhite/AP)

The decision was a defeat not just for employers, but also the Trump administration, which argued that the law’s plain wording compelled a ruling for the employers. Mr Gorsuch, a conservative appointee of President Donald Trump, concluded the opposite.

He was joined in the majority by Chief Justice John Roberts and the court’s four liberal members.

Brett Kavanaugh, Mr Trump’s other Supreme Court pick, dissented, along with Samuel Alito and Clarence Thomas.

“The court tries to convince readers that it is merely enforcing the terms of the statute, but that is preposterous,” Mr Alito wrote in the dissent.

“Even as understood today, the concept of discrimination because of ‘sex’ is different from discrimination because of ‘sexual orientation’ or ‘gender identity’.”

Mr Kavanaugh wrote in a separate dissent that the court was rewriting the law to include gender identity and sexual orientation, a job that belongs to Congress.

Mr Trump had a restrained reaction, telling reporters he had read the decision and that “some people were surprised”.

He added: “But they’ve ruled and we live with their decision. That’s what it’s all about. We live with the decision of the Supreme Court. Very powerful. A very powerful decision actually. But they have so ruled.”

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

Gerald Bostock, a gay county government worker from Georgia whose lawsuit was one of three the Supreme Court decided on Monday, said no one should should have to be “fearful of losing their job because of who they are, who they love or how they identify. And the justices have now made sure that we won’t have to worry about that”.

Monday’s decision is not likely to be the court’s last word on a host of issues revolving around LGBT rights, Mr Gorsuch noted.

Rights groups have said they will challenge the administration’s effort to roll back anti-discrimination protections for transgender people in health care.

Lawsuits are pending over transgender athletes’ participation in school sporting events, and courts also are dealing with cases about sex-segregated toilets and locker rooms, a subject that the justices seemed concerned about during arguments in October.

Employers who have religious objections to employing LGBT people also might be able to raise those claims in a different case, Mr Gorsuch said.

“But none of these other laws are before us; we have not had the benefit of adversarial testing about the meaning of their terms, and we do not prejudge any such question today,” he wrote.

The cases were the court’s first on LGBT rights since Justice Anthony Kennedy’s retirement and replacement by Mr Kavanaugh.

Mr Kennedy was a voice for gay rights and the author of the landmark ruling in 2015 that made same-sex marriage legal throughout the US. Mr Kavanaugh generally is regarded as more conservative.

The Trump administration had changed course from the Obama administration, which supported LGBT workers in their discrimination claims under Title VII.

During the Obama years, the federal Equal Employment Opportunity Commission had changed its longstanding interpretation of civil rights law to include discrimination against LGBT people.

The law prohibits discrimination because of sex, but has no specific protection for sexual orientation or gender identity.

Democratic presidential contender Joe Biden, Mr Obama’s vice president, praised the decision on Twitter as “another step in our march toward equality for all. The Supreme Court has confirmed the simple but profoundly American idea that every human being should be treated with respect”.