The Supreme Court now has the chance to settle whether federal law safeguards LGBT people from workplace discrimination, which has split courts around the country and left a patchwork of legal protections in the wake of those divisions.

At least nine federal circuit courts ruled in decisions prior to 2007 that sexual orientation wasn’t covered by Title VII of the 1964 Civil Rights Act, which prohibits bias against workers and job applicants based on their “sex.” The tide began to shift in 2015, when the Equal Employment Opportunity Commission decided in a federal sector case that Title VII does apply to sexual orientation.

In a groundbreaking decision in 2017, the U.S. Court of Appeals for the Seventh Circuit became the first federal appeals court to rule that Title VII covers sexual orientation when it said a lesbian job applicant could sue an Indiana community college for discrimination. While the Eleventh Circuit decided earlier that year that the law doesn’t apply to sexual orientation, the Second Circuit deepened the split in the courts with its 2018 ruling that it does.

The application of Title VII to gender identity has seen less litigation than sexual orientation. Three circuit courts ruled the law doesn’t cover gender identity, but those decisions came before the Supreme Court’s 1989 decision in Price Waterhouse v. Hopkins, which said employers can’t discriminate against people who don’t conform to gender stereotypes.

The Sixth Circuit relied on Price Waterhouse in 2004 to rule that Title VII protects transgender people from workplace bias based on stereotypes, a position it has broadened in subsequent decisions. But the Tenth Circuit refused to extend the gender stereotyping logic from Price Waterhouse in 2007 and split from the Sixth Circuit.

In recent years, the Obama and Trump administrations have taken differing positions on the scope of Title VII. The Obama-era EEOC said transgender workers are protected by Title VII in a 2012 federal sector case. The Justice Department issued a memo in 2014 saying the law applies to gender identity, but the department rescinded that memo in 2017 and now says it doesn’t. The Justice Department that year also argued in a brief that Title VII doesn’t apply to sexual orientation, which clashes with the EEOC’s view of the law.