A federal judge in Texas has ruled that workers can't be discriminated against based on their gender identity or sexual orientation.

Judge Lee Rosenthal — the chief judge in the Houston-based Southern District Court of Texas — ruled that workers are protected from such discrimination under the federal employment law that protects workers based on their gender, The Dallas Morning News reported.

The decision came during a case in which a woman claimed she was not hired by Phillips 66, an energy company, because she was transgender.

Rosenthal ruled that the woman, Nicole Wittmer, couldn't prove that she wasn't hired because she was transgender. But she also ruled that if Wittmer could prove she was discriminated against due to her gender identity, she would have cause to sue under federal law.

Wittmer's lawyer told The Dallas Morning News that while they were disappointed the ruling did not go in their favor, the decision that a worker could sue under federal law for discrimination because of gender identity was a big deal.

"The silver lining here is it has helped to define the landscape for people who have been discriminated [against] in the workplace due to their transgender status," lawyer Alfonso Kennard Jr. said Monday. "This ruling is earth-shattering — in a good way."

The decision marked the first time a federal judge in Texas has said that LGBT workers cannot be discriminated against under Title VII, which bars sex discrimination in the workplace, according to The Dallas Morning News.

"Within the last year, several circuits have expanded Title VII protection to include discrimination based on transgender status and sexual orientation," Rosenthal wrote. "Although the Fifth Circuit has not yet addressed the issue, these very recent circuit cases are persuasive. ... The court assumes that Wittmer's status as a transgender woman places her under the protections of Title VII."

Buy It Now!