President Donald Trump and Attorney General Jeff Sessions (Shawn Thew-Pool/Getty)

A US federal court has ruled that civil rights laws protect gay workers from discrimination, after the Trump administration argued it was legal to fire people for being gay.

The U.S. Court of Appeals for the 2nd Circuit ruled in the case of Donald Zarda, a former skydiving instructor who alleges that that his old company, Altitude Express Inc, fired him because of his sexuality.

Republicans in Congress continue to block federal legislation to protect LGBT people from discrimination, but Zarda’s lawyers cited civil rights protections from the 1960s which outlaw discrimination in employment based on sex.

The Trump administration’s Justice Department, headed by anti-LGBT Attorney General Jeff Sessions, made an uninvited intervention in the case, arguing before the court that that civil rights provision, Title VII of the Civil Rights Act of 1964, does not provide any protection for gay people.

But the court has today gone against the Justice Department’s argument – in a landmark decision for LGBT equality.

The judges, who considered the case en banc, wrote: “We now hold that sexual orientation discrimination constitutes a form of discrimination ‘because of sex’, in violation of Title VII.

“We therefore VACATE the district court’s judgment on the Title VII claim and REMAND for further proceedings consistent with this opinion.”

Explaining the decision, the judges wrote: “The Supreme Court has held that Title VII prohibits not just discrimination based on sex itself, but also discrimination based on traits that are a function of sex, such as life expectancy, and non‐conformity with gender norms.

“We now conclude that sexual orientation discrimination is motivated, at least in part, by sex and is thus a subset of sex discrimination. Looking first to the text of Title VII, the most natural reading of the statute’s prohibition on discrimination “because of sex’ is that it extends to sexual orientation discrimination, because sex is necessarily a factor in sexual orientation.”

The judges added:”Because one cannot fully define a person’s sexual orientation without identifying his or her sex, sexual orientation is a function of sex.

“Indeed sexual orientation is doubly delineated by sex because it is a function of both a person’s sex and the sex of those to whom he or she is attracted.

“Logically, because sexual orientation is a function of sex and sex is a protected characteristic under Title VII, it follows that sexual orientation is also protected.”

The decision is a victory for the estate of Mr Zarda, who passed away after beginning litigation against his employer.

The judges recalled of the case: “In the summer of 2010, Donald Zarda, a gay man, worked as a sky‐diving instructor at Altitude Express.

“As part of his job, he regularly participated in tandem skydives, strapped hip‐to‐hip and shoulder‐to‐shoulder with clients.

“In an environment where close physical proximity was common, Zarda’s co‐workers routinely referenced sexual orientation or made sexual jokes around clients, and Zarda sometimes told female clients about his sexual orientation to assuage any concern they might have about being strapped to a man for a tandem skydive.

“That June, Zarda told a female client with whom he was preparing for a tandem skydive that he was gay ‘and had an ex‐husband to prove it’.”

Zarda was sacked after the woman complained about his conduct – but brought a lawsuit alleging discriminatory treatment by his employer.

The decision flies in the face of representations from the Justice Department, which had intervened in the case without invitation.

The DOJ had insisted: “Discrimination based on sexual orientation does not fall within Title VII’s prohibition on sex discrimination because it does not involve “disparate treatment of men and women”.

Deputy Assistant Attorney General Hashim M. Mooppan appeared before the court this week to argue against gay rights protections, saying: “There is a commonsense, intuitive difference between sex and sexual orientation.”

“Rather than causing similarly situated ‘members of one sex [to be] exposed to disadvantageous terms or conditions of employment to which members of the other sex are not exposed’, differential treatment of gay and straight employees for men and women alike.”

The DOJ also argued somewhat circularly contended that it was clear that existing civil rights law doesn’t protect gay people, because lawmakers in Congress continue to block more explicit legislation “that would prohibit discrimination in employment based on sexual orientation”.

The issue is likely to end up before the Supreme Court.