The 7th U.S. Circuit Court of Appeals ruled on April 4, that federal civil rights law protects lesbian, gay, bisexual and transgender employees from workplace discrimination. (Reuters)

A federal appeals court ruled Tuesday that workers may not be fired for their sexual orientation, becoming the highest court in the country to find that the 1964 Civil Rights Act protects gays from workplace discrimination and setting up a possible Supreme Court battle.

The U.S. Court of Appeals for the 7th Circuit, based in Chicago, found that instructor Kimberly Hively was improperly passed over for a full-time job at Ivy Tech Community College in South Bend, Ind., because she is a lesbian. While Title VII of the Civil Rights Act does not explicitly prohibit discrimination on the basis of sexual orientation, it bars sex discrimination; the court concluded that the college engaged in sex discrimination by stereotyping Hively based on her gender.

“Hively represents the ultimate case of failure to conform to the female stereotype … she is not heterosexual,” Chief Judge Diane Wood wrote in Tuesday’s opinion. “Hively’s claim is no different from the claims brought by women who were rejected for jobs in traditionally male workplaces, such as fire departments, construction, and policing.”

She added: “Any discomfort, disapproval, or job decision based on the fact that the complainant — woman or man — dresses differently, speaks differently, or dates or marries a same-sex partner, is a reaction purely and simply based on sex. That means that it falls within Title VII’s prohibition against sex discrimination, if it affects employment in one of the specified ways.”

One of the country’s most noted conservative judges, Frank Easterbrook, joined the decision.

The 8-3 ruling echoes recent decisions by lower courts, which also have concluded that discrimination against gays is a prohibited form of sex stereotyping. It conflicts, however, with many others, including a ruling last month by a three-judge panel of the U.S. Court of Appeals for the 11th Circuit in Atlanta, which interpreted Title VII of the Civil Rights Act more narrowly and found that sexual orientation is not a protected class under that law.

A split in the circuits could set up a clash before the Supreme Court.

Writing for the dissenters, Circuit Judge Diane S. Sykes accused the majority of altering the long-standing interpretation of Title VII of the Civil Rights Act, which makes it illegal for an employer “to fail or refuse to hire or to discharge any individual, or otherwise to discriminate against any individual … because of such individual’s race, color, religion, sex, or national origin.” In the past, courts routinely found that the prohibition did not cover sexual orientation, but that has changed in recent years, particularly since the Supreme Court ruled in 2015 that same-sex couples have a right to marry.

The majority’s conclusion conflicts as well with the commonly held definition of sex, she added. “Because sexual orientation discrimination is not synonymous with sex discrimination in ordinary usage, Title VII does not prohibit sexual-orientation discrimination. Not expressly (obviously), and not by fair implication either,” she wrote.

Rights groups hailed the decision as a game-changer, bolstering protections for gay people who may have won the right to marry but may still fear being fired because of their sexual orientation.

“In many cities and states across the country, lesbian and gay workers are being fired because of who they love. But, with this decision, federal law is catching up to public opinion,” Greg Nevins, director of the employment fairness program at Lambda Legal, the organization that represented Hively in this case, said in a statement. “Ninety percent of Americans already believe that LGBT employees should be valued for how well they do their jobs — not who they love or who they are. Now, through this case and others, that principle is backed up by the courts.”

Passing regulations that explicitly bar discrimination against LGBT people has been a top priority of the lesbian, gay, bisexual and transgender rights movement since the Supreme Court marriage decision. According to Freedom for All Americans, an LGBT rights group, 28 states lack statewide laws that explicitly protect people from discrimination on the basis of sexual orientation or gender identity. Such protections are also absent from federal law.

Some towns and cities in those states have tried to expand their own anti-discrimination statutes to include protections on the basis of sexual orientation and gender identity. Although many have been successful, others have failed after opponents argued that they could give cover to sexual predators to prey on women and girls in public restrooms under the guise of transgender rights. That concern led North Carolina last year to pass a statewide measure requiring people to use the public restroom that matches the gender on their birth certificates — a direct strike against a civil rights statute adopted by the city of Charlotte.

State lawmakers, under pressure from business boycotts and threats by sports leagues to move major sporting events out of state, partly repealed the measure last week. But the compromise measure prohibited cities such as Charlotte from passing their own anti-discrimination ordinances, a provision that angered rights groups that accused the Democratic governor and their allies in the legislature of capitulating to anti-transgender forces.

The issue has received attention from President Trump, who earlier this year announced that he would keep in place executive orders signed by President Barack Obama requiring government contractors to have anti-discrimination policies in place that protect LGBT people. But his administration also reversed course on Obama-era guidance requiring schools to let transgender students use the restroom of their choice.

This story has been updated.

Staff Writer Robert Barnes contributed to this report.