(CNN) A federal appeals court in New York ruled on Monday that Title VII of the Civil Rights Act of 1964, a federal law that bans employment discrimination because of sex, also protects claims of discrimination based on 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," a 10-3 opinion issued by the 2nd US Circuit Court of Appeals stated.

The ruling is a loss for the Trump administration, which had argued that Congress did not mean Title VII to extend to claims of sexual orientation.

The court, based in New York, becomes the second appeals court to rule that the civil rights law covers discrimination based on sexual orientation. Last year, the 7th Circuit Court of Appeals issued a similar ruling.

The ruling means that employees in those two circuits can use existing civil rights law to sue for discrimination based on sexual orientation.

Read More