An appeals court for the first time has ruled that workplace discrimination based on sexual orientation violates existing law.

The full bench of the 7th U.S. Circuit Court of Appeals in Chicago on Tuesday ruled 8-3 that Title VII of the Civil Rights Act of 1964 protects workers from discrimination based on sexual orientation.

According to Politico, five of the eight justices in the court's majority were Republican appointees.

Judge Diane Wood wrote the court's majority opinion.

“A policy that discriminates on the basis of sexual orientation does not affect every woman, or every man, but it is based on assumptions about the proper behavior for someone of a given sex,” Wood wrote. “The discriminatory behavior does not exist without taking the victim’s biological sex (either as observed at birth or as modified, in the case of transsexuals) into account. 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.”

“It is actually impossible to discriminate on the basis of sexual orientation without discriminating on the basis of sex,” she added.

The Human Rights Campaign (HRC), the nation's largest LGBT rights advocate, applauded the decision.

“Today’s ruling is a monumental victory for fairness in the workplace, and for the dignity of lesbian, gay and bisexual Americans who may live in fear of losing their job based on whom they love,” said HRC Legal Director Sarah Warbelow. “This court joins five others that have ruled these laws also prohibit discrimination on the basis of gender identity. We congratulate plaintiff Kimberly Hively, Lambda Legal and all the attorneys who helped achieve this victory.”

The ruling comes just three weeks after a three-judge panel in Atlanta ruled that such protections do not exist under current law.

(Related: Appeals court finds discrimination against gay workers allowed under existing law.)

Kimberly Hively, an adjunct professor at Ivy Tech Community College in Indiana, claimed in her lawsuit that she was denied a permanent teaching position because she is a lesbian.