WASHINGTON — A new federal court ruling holds that Title VII of the Civil Rights Act could be used to protect gay people from employment discrimination.

Title VII's prohibition on sex discrimination has long been held to prohibit sex stereotyping and sexual harassment — including allowing claims of same-sex sexual harassment — but courts generally have held back on finding that sexual orientation discrimination itself is covered by Title VII.

In the March 31 decision, U.S. District Court Judge Colleen Kollar-Kotelly ruled that Peter TerVeer's case against the Library of Congress can move forward. TerVeer sued the Library of Congress under Title VII's ban on sex discrimination, claiming that he faced discrimination after his boss found out that he was gay.

Although it was not a final decision about the merits of TerVeer's claim, the district court ruling was a decision that he did "state a claim upon which relief can be granted." The ruling means that, if the facts support his claims, TerVeer could succeed in his lawsuit on the Title VII claim.

TerVeer claimed in the lawsuit that his boss, John Mech, created "a hostile environment in which he imposed his religion and sexual stereotypes" on TerVeer. After TerVeer complained about this treatment to Mech and his boss's boss, Nicholas Christopher, he received negative performance reviews and other claimed mistreatment — called "a campaign of retaliation in response to TerVeer's allegations of discrimination" in the lawsuit.

The government sought to dismiss the claims in TerVeer's lawsuit, including his claim that Title VII's sex discrimination ban protected against discrimination based on his sexual orientation. Kollar-Kotelly dismissed some of the claims in the ruling, but she allowed the Title VII claims of sex discrimination and religious discrimination to move forward.

Title VII does not explicitly protect against sexual orientation discrimination, but TerVeer's lawyers claimed — and Judge Kollar-Kotelly agreed — that a person could bring a claim under Title VII's ban on sex discrimination because an employer views an employee's sexual orientation as "not consistent with ... acceptable gender roles."

Although sexual orientation-based Title VII claims have often failed in the past, claims that the sex discrimination ban includes gender identity-based discrimination have been more successful. The D.C. federal district court previously considered such a claim in a 2009 decision. Then, U.S. District Court Judge James Robertson decided that Diane Schroer could bring a claim under Title VII when she lost a job offer from the Library of Congress after she announced her intention to transition and begin presenting as a female. That view has been echoed by multiple federal appeals courts and, in 2012, by the Equal Employment Opportunity Commission — a ruling that has been enforced against government and private employers.

The same has not been true of sexual orientation claims. As recently as last week, a state appeals court in Ohio held that that state's sex discrimination ban did not protect people against sexual orientation discrimination. EEOC Commissioner Chai Feldblum — instrumental in the EEOC's 2012 Macy v. Holder decision regarding gender identity coverage under Title VII — has long argued that Title VII's sex discrimination ban should be held to ban sexual orientation discrimination as well as gender identity discrimination.

As Feldblum wrote recently in the New York Times, "[A]ssume a male employee is fired because he marries another man. The reason for that employee's firing makes reference to the sex of the people involved, and the antipathy to marriage by a same-sex couple is deeply embedded in a history of gender roles and sex stereotypes. From my perspective, that is a simple case of sex discrimination."

Lambda Legal, an LGBT legal nonprofit, filed a brief last year in support of TerVeer's claim in this case, citing a similar argument to that advanced by Feldblum. "It is impossible to reconcile the unanimous view of the courts and the EEOC for decades that discrimination based on an employee's interracial marriage or interracial friendships is 'manifestly' or 'irrefutab[ly]' race discrimination proscribed by Title VII," the lawyers argued, "with an argument that discrimination based on one's same-sex intimate relationships is not sex discrimination."