The powerful Court of Appeals for the Second Circuit said 1964’s Civil Rights Act bans discrimination based on sexual orientation.

Ten of 13 judges of the New York City-based Second Circuit U.S. Court of Appeals ruled Monday that the Civil Rights Act protects gay and bisexual workers from sexual orientation discrimination. The ruling runs counter to Donald Trump’s Justice Department, which argued that Title VII of the 1964 law does not include protections for gay and bisexual people.

Like other judges have previously interpreted the law, the Second Circuit ruled that sexual orientation discrimination is sex discrimination, which is explicitly banned in the Lyndon Johnson-era legislation.

“A woman who is subject to an adverse employment action because she is attracted to women would have been treated differently if she had been a man who was attracted to women,” Judge Robert Katzman wrote in the majority opinion, according to Buzzfeed. “We can therefore conclude that sexual orientation is a function of sex and, by extension, sexual orientation discrimination is a subset of sex discrimination.”

The case involved Donald Zarda, a skydiving instructor who sued his New York-based employer in 2010 after he was fired after a customer complained he was gay (Zarda later died in a BASE-jumping accident). The Equal Employment Opportunity Commission, a federal agency, sided with Zarda. The Justice Department — currently led by homophobe Jeff Sessions — took the opposite tack, arguing to the Second Circuit that Congress never intended to protect gays from workplace discrimination.

"There is a common-sense difference between sex discrimination and sexual orientation discrimination," a Justice Department attorney argued to the court in September.

Though certain states have enacted such protections, there is no federal law preventing LGBT people from being fired for their sexual orientation or gender identity.

Even with the Second Court’s ruling, there is no final word on Title VII’s breadth. Zarda’s former employer can appeal to the Supreme Court; the high court declined to hear a challenge to an 11th Circuit ruling that said protections against sex discrimination do not cover sexual orientation bias.