WASHINGTON (Reuters) - The U.S. Supreme Court on Tuesday appeared closely divided over whether a landmark federal law forbidding sex discrimination in the workplace protects gay and transgender employees, with conservative Justice Neil Gorsuch emerging as a potential decisive vote.

The nine justices heard two hours of high-profile arguments in three cases that could broaden LGBT rights involving three workers - two gay and one transgender - who sued after being fired by their employers, claiming unlawful discrimination. The Supreme Court has never ruled on transgender rights.

The court’s four liberal justices signaled agreement toward arguments by the plaintiffs that gay and transgender workers are covered under Title VII of the Civil Rights Act of 1964, which bars employers from discriminating against employees on the basis of sex as well as race, color, national origin and religion.

Some of the court’s five conservative justices appeared skeptical, but Gorsuch, a conservative appointed by President Donald Trump, asked several questions indicating potential sympathy for the plaintiffs’ claims.

Gorsuch suggested that sex, as defined in the law, can be a contributing factor to someone being fired based on their sexual orientation. “Sexual orientation is surely in play here. But isn’t sex also in play here?,” Gorsuch asked, adding, “And isn’t that enough?”

“In what linguistic formulation would one say that sex - biological gender - has nothing to do with what happened in this case?” Gorsuch added, referring to the two fired gay plaintiffs, one from Georgia and one from New York. The third case involved a transgender plaintiff fired from a job in Michigan.

But Gorsuch later suggested the court would be overstepping its role if it ruled in favor of gay and transgender workers instead of letting Congress legislate on the subject, saying such it would be the type of ruling that could ignite “massive social upheaval.”

“It’s a question of judicial modesty,” Gorsuch said.

But liberal Justice Sonia Sotomayor asked, “At what point does the court continue to permit invidious discrimination?”

At least one of the conservative justices would have to join the four liberals for the plaintiffs to prevail. Rulings in the cases are due by the end of June.

Conservative Chief Justice John Roberts, sometimes considered the ideological center of the court, appeared concerned about religious employers facing increased liability if gay and transgender workers receive Title VII protection.

Justice Samuel Alito, a conservative, said that if the court decides that Title VII protects gay people it would effectively be rewriting a law enacted by Congress in a way that was never intended by the lawmakers who passed it.

Conservative Justice Brett Kavanaugh, Trump’s other appointee, said little to indicate how he might vote. Justice Clarence Thomas, who missed the opening day of the court’s term on Monday with an illness, was at the arguments but asked no questions, as is his custom.

Slideshow ( 17 images )

The Trump administration argued that Title VII does not cover sexual orientation or gender identity.

GAY MARRIAGE

The Supreme Court delivered an important gay rights decision in 2015 legalizing same-sex marriage nationwide. Its dynamics on LGBT issues changed following the 2018 retirement of Justice Anthony Kennedy, a conservative who backed gay rights in major cases including same-sex marriage. He was replaced by Kavanaugh.

Slideshow ( 17 images )

The legal fight focuses on the definition of “sex” in Title VII. The plaintiffs, along with civil rights groups and many large companies, have argued that discriminating against gay and transgender workers is inherently based on their sex and consequently is illegal.

Liberal justices appeared skeptical of arguments by the Trump’s administration’s lawyer, Solicitor General Noel Francisco, and a lawyer for the employers that Title VII does not cover sexual orientation because it is a separate trait than sex.

Liberal Justice Elena Kagan said the court has always analyzed such discrimination cases in a simple way: Would it have happened if the person were a different sex? “Obviously the same thing would not have happened,” Kagan said.

Hundreds of demonstrators backing LGBT rights gathered near the courthouse, holding signs reading, “Do fire Trump. Don’t fire LGBTQ workers,” “Discrimination is bad for business” and “LGBT Americans power our economy.” A small group opposing gay and transgender rights held signs including “Fear God” and “Sin and shame, not pride.”

A ruling in favor of the plaintiffs would provide gay and transgender workers greater protections, especially in the 28 U.S. states that lack comprehensive measures against employment discrimination. A ruling against the plaintiffs would mean gay and transgender people in those states would have few options to challenge workplace discrimination.

The court heard two cases about gay people who have said they were fired due to their sexual orientation. One involves a former county child welfare services coordinator from Georgia named Gerald Bostock. The other involves a New York skydiving instructor named Donald Zarda. He died after the case began and the matter is being pursued by his estate.

The third involved a transgender funeral director named Aimee Stephens fired by a Detroit funeral home after revealing plans to transition from male to female.

Stephens told reporters outside the courthouse, “I think we’ll have to see, but I’m optimistic.”