The 10-3 ruling by the Second Circuit stemmed from Altitude Express’s dismissal of a Long Island sky-driving instructor, Donald Zarda, in 2010. As Mr. Zarda was preparing that year for a tandem sky-dive with a female student, he told her that he was “100 percent gay.” Her boyfriend later complained to the school about the comment.
Mr. Zarda said he had made the remark to soothe the woman, who seemed uncomfortable with being so tightly strapped to him during the dive. Mr. Zarda filed a lawsuit, eventually claiming that his firing violated Title VII. Two courts in New York, including a three-judge panel of the Second Circuit, initially ruled against him.
In 2015, Mr. Zarda died in a sky-diving accident. His appeal, however, continued, and the legal landscape started changing. The E.E.O.C., under President Barack Obama, issued a ruling in a separate matter, finding for the first time that “sexual orientation is inherently a ‘sex-based consideration’” and should be protected by the law.
In July, the Trump administration decided to weigh in on the Zarda case. On the same day that Mr. Trump suggested on Twitter that transgender people would be barred from serving in the military, Justice Department lawyers filed a friend of the court brief in Mr. Zarda’s case, arguing that Title VII protections did not extend to sexual orientation.
In its brief, the Justice Department said that the E.E.O.C. was “not speaking for the United States.”
The Justice Department’s intervention in Mr. Zarda’s case led to sharp criticism from groups like the American Civil Liberties Union, which called the brief a “gratuitous and extraordinary attack on L.G.B.T. people’s civil rights.”
The Second Circuit’s ruling on Monday rejected the Justice Department’s position.
In a majority opinion joined at least in part by eight other judges, Chief Judge Robert A. Katzmann wrote, “Since 1964, the legal framework for evaluating Title VII claims has evolved substantially,” adding that it now included expanded protections against discrimination based on factors like “sex stereotypes.” The opinion said that the law should be read to include sexual orientation.
“Sexual orientation discrimination is a subset of sex discrimination because sexual orientation is defined by one’s sex in relation to the sex of those to whom one is attracted,” Judge Katzmann wrote, “making it impossible for an employer to discriminate on the basis of sexual orientation without taking sex into account.”
A 10th judge, José A. Cabranes, agreed with the outcome, but not Judge Katzmann’s reasoning. The appeals court rarely issues decisions through what is known as the en-banc court, in which all eligible judges participate. Typically, it issues decisions through three-judge panels.
Judge Gerard E. Lynch, one of the dissenting judges, said in an opinion that he came to his decision “regretfully,” but that Congress had not included sexual orientation on its list of grounds to outlaw bias in the workplace.
“When interpreting an act of Congress,” Judge Lynch wrote, “we need to respect the choices made by Congress about which social problems to address, and how to address them.” Many states, he noted, had “recognized the injustice of discrimination on the basis of sexual orientation.”
“I hope that one day soon Congress will join them, and adopt that principle on a national basis,” he wrote. “But it has not done so yet.”
Justice Department officials have previously said that Congress, and not the courts, should decide who is protected under the law.
Following the ruling on Monday, Devin O’Malley, a Justice Department spokesman, adhered to that message, saying that while the department was “committed to protecting the civil and constitutional rights of all individuals,” it was also “committed to the fundamental principle that the courts cannot expand the law beyond what Congress has provided.”
In the past year or so, two separate federal appeals courts have issued conflicting rulings on Title VII. Last March, a divided three-judge panel of the 11th Circuit Court of Appeals in Atlanta ruled that Title VII’s reference to sex did not encompass discrimination based on sexual orientation. One month later, however, the Seventh Circuit in Chicago, by an 8-to-3 vote, held that bias based on sexual orientation was in fact “a form of sex discrimination.”
In December, the Supreme Court denied a request to hear an appeal filed by the plaintiff in the Atlanta case. But with Monday’s ruling essentially in line with the finding by the Seventh Circuit in Chicago, the appeals courts’ varying viewpoints may be enough to prompt Supreme Court review.
Saul Zabell, the lawyer for Altitude Express, said he was pleased that the ruling fixed “a glaring legislative gap in fundamental human rights,” but added that he was also “disappointed that the panel chose to ignore the facts of underlying matter” and “exceeded their judicial mandate.”
In a brief statement, Eric T. Schneiderman, the New York State attorney general, who filed an amicus brief in the case, said on Monday: “No one should face discrimination because of their sexual orientation — and I am pleased that the Second Circuit has sent a clear statement in support of equal justice today.”
Bill Moore, a co-executor of Mr. Zarda’s estate, also praised the ruling.
“Today’s victory is a wonderful step forward for the country as a growing number of Americans take a stand against anti-L.G.B.T.Q. employment discrimination,” Mr. Moore said in a statement. “I wish Don were here to see how he and his case have advanced the movement for L.G.B.T.Q. equality.”