A federal appeals court in Chicago ruled Tuesday that a 1964 law barring sex discrimination extends to sexual orientation, marking a major workplace victory for gays and lesbians.

The 8-3 decision by the full U.S. Court of Appeals for the 7th Circuit, which overturned a three-judge panel's ruling, represents another step in the effort by gay rights groups to extend their 2015 nationwide victory on same-sex marriage to other areas, including jobs, housing and public accommodations.

"It is actually impossible to discriminate on the basis of sexual orientation without discriminating on the basis of sex," Chief Judge Diane Wood wrote for the majority. "It would require considerable calisthenics to remove the 'sex' from 'sexual orientation.'"

The ruling on behalf of Kimberly Hively, an instructor at Ivy Tech Community College in South Bend, Ind., fired because she is lesbian, makes the 7th Circuit the highest federal court to protect LGBT people under the 1964 Civil Rights Act's prohibition against sex discrimination. Title VII of that law also bans discrimination on the basis of race, color, national origin and religion.

Greg Nevins of Lambda Legal, which brought the case, said it is a "game-changer for lesbian and gay employees facing discrimination in the workplace and sends a clear message to employers: It is against the law to discriminate on the basis of sexual orientation.”

Judge Richard Posner, in a concurrence, said: "I don’t see why firing a lesbian because she is in the subset of women who are lesbian should be thought any less a form of sex discrimination than firing a woman because she’s a woman."

The decision illustrated the rift between judges who adhere to the Constitution and laws as written and understood at the time, and those who take into consideration judicial precedents and societal changes in the aftermath.

Judge Diane Sykes, who was a finalist on President Trump's list of potential Supreme Court nominees, wrote the dissent. She accused the court of "an aggressive reading of loosely related Supreme Court precedents" in order to circumvent the legislative process.

"If Kimberly Hively was denied a job because of her sexual orientation, she was treated unjustly," Sykes said. "But Title VII does not provide a remedy for this kind of discrimination. The argument that it should must be addressed to Congress."

But Wood, who was considered for a Supreme Court nomination under President Barack Obama, said the ruling properly reflects "what the correct rule of law is now in light of the Supreme Court’s authoritative interpretations, not what someone thought it meant one, ten, or twenty years ago."

“Love won again today,” Lambda Legal CEO Rachel Tiven said. “Kim Hively loved her job teaching math at Ivy Tech Community College, but she was fired because she is a lesbian. Today, the 7th Circuit said clearly: that’s wrong."