WASHINGTON — The Supreme Court said Monday it will decide whether existing civil rights laws ban discrimination on the basis of sexual orientation, a question that has divided the nation's lower courts.

Federal law forbids workplace discrimination on the basis of race, color, religion, sex or national origin. It does not explicitly apply to LGBT individuals, but gay rights advocates have argued that firing employees because of their sexual orientation is already prohibited as a form of sex discrimination under Title VII of the Civil Rights Act. They've been hoping to achieve in the courts what they have so far been unable to get in Congress — a nationwide ban on job discrimination.

The cases accepted Monday reflect the split among federal courts. Two appeals courts ruled that employers violated Title VII by firing gay and transgender employees. A third said civil rights laws don't cover sexual orientation.

For decades, every federal appeals court to consider whether gay employees are entitled to nondiscrimination protection ruled that they are not. But advocates of LGBT rights argued that support for that position has been eroding. In 1989, the Supreme Court said Title VII bans discrimination based on an employee's failure to act according to sex-based expectations, ruling for a woman denied a promotion who was told to walk, talk and dress femininely, wear makeup and jewelry, and have her hair styled.

In 1998, the court ruled that a heterosexual offshore oil rig worker could sue for sex discrimination even though he was sexually harassed by other men on the job. Congress didn't have that kind of discrimination in mind when the civil rights law was passed in 1964, the Supreme Court said, but "statutory prohibitions often go beyond the principal evil to cover reasonably comparable evils."

The federal Equal Employment Opportunity Commission concluded in 2015 that Title VII does protect against LGBT job discrimination. President Barack Obama's Justice Department took the same position, but under President Donald Trump it reversed course, opposing that conclusion.

Among the cases to be heard next term are an appeal from a ruling in favor of a New York skydiving instructor, Donald Zarda, who said he was fired after telling a female client that he was gay so she shouldn't worry about being strapped tightly against him during the dive. The 2nd Circuit Court of Appeals said sexual orientation discrimination is a subset of sex discrimination.

The 6th Circuit Court of Appeals said a woman who worked for a Michigan funeral home was impermissibly fired two weeks after she told her employer she was transgender. Her employer said she did not follow the dress code, but the court said transgender discrimination is prohibited by Title VII.

"Discrimination 'because of sex' inherently includes discrimination against employees because of a change in their sex," it said.

In the third case, the 11th Circuit Court of Appeals ruled against a Georgia man who lost his job with Clayton County after his participation in a gay softball league became known to his employer. That court said the civil rights law does not cover sexual orientation discrimination.

Because of the split among the lower courts, advocates on both sides of the issue were urging the Supreme Court to correct what they said were erroneous rulings.

Mara Keisling, executive director of the National Center for Transgender Equality, said the Supreme Court's decision to take the case "is a historic turning point for transgender people across this country."

"Americans decided long ago that no person should have to fear losing their job because of who they are, and we hope the Supreme Court understands its responsibility to uphold established law and this enduring American value," Keisling said in a statement.

The court will hear the cases in its next term, which begins in October.