The Trump administration took its hardest line yet to legalize anti-gay discrimination on Friday when it asked the Supreme Court to declare that federal law allows private companies to fire workers based only on their sexual orientation.

An amicus brief filed by the Justice Department weighed in on two cases involving gay workers and what is meant by Title VII of the Civil Rights Act of 1964, which bans discrimination "because of sex.” The administration argued courts nationwide should stop reading the civil rights law to protect gay, lesbian, and bisexual workers from bias because it was not originally intended to do so.

That view conflicts with some lower court rulings that found targeting someone for their sexual orientation is an illegal form of both sex discrimination and sex stereotyping under Title VII. Those courts have found, to illustrate the point, that a gay man wouldn't be targeted if he were instead a woman dating a man; thus he faced discrimination because of his sex.

But the administration said in its brief Friday that Title VII’s ban on sex discrimination only prohibits unequal treatment between "biological sexes,” as it argued last week in a related brief against transgender rights, in which the Justice Department said companies should be able to fire people because they are transgender as well.

Congress did not explicitly say that the meaning of sex in Title VII encompasses LGBTQ people, so, the administration argues, the law cannot apply to sexual orientation. Federal lawyers are asking the Supreme Court, for the first time, to explicitly limit the Civil Right Act’s protections to exclude LGBTQ people.

“Title VII’s prohibition on discrimination because of sex does not bar discrimination because of sexual orientation,” said the Justice Department’s brief.

“The ordinary meaning of ‘sex’ is biologically male or female; it does not include sexual orientation,” the filing continued. “An employer thus discriminates ‘because of ... sex’ under Title VII if it treats members of one sex worse than similarly situated members of the other sex. Discrimination on the basis of sexual orientation, standing alone, does not satisfy that standard.”

The Justice Department added that Congress only intended to ban discrimination because someone is male or female — saying the sexes cannot be treated differently — and that other laws recognizing LGBTQ people show Congress could have amended Title VII to include LGBTQ rights, but chose not to. The administration said interpreting the term “sex” more broadly effectively rewrites the law, and only Congress, not courts, has that license.

A Supreme Court ruling in the government’s favor could trigger cascading ramifications for LGBTQ rights. Limiting the scope of Title VII would assert that a raft of state and federal laws banning sex-based discrimination have no application for sexual orientation or gender identity, a ruling that would likely reach far beyond employment to other settings where sex discrimination is banned, including public schools.

No federal law explicitly bans anti-LGBTQ discrimination in workplaces. Several LGBTQ individuals have successfully invoked Title VII in lower courts, while other courts have reached the opposite conclusion. It appeared inevitable that the high court would eventually hear a case on the scope of Title VII for LGBTQ people to resolve those conflicts.

The Justice Department also filed a separate motion on Friday asking for Solicitor General Noel Francisco to get time during oral arguments when the Supreme Court hears the case next month, saying, “The United States has a substantial interest” in the case. (The solicitor general under any administration has been called the 10th justice due to the position’s heavy influence on the court.)

The Justice Department's brief argued that sex discrimination cannot be construed broadly to include LGBTQ workers because, as a general matter, it is legal for sex-segregated rules to exist, such as restrooms and dress codes. Instead, the government argues, sex discrimination occurs only when “similarly situated” individuals are treated differently — not comparing a gay person to a straight person.

“The correct comparison is between a female employee in a same-sex relationship and a male employee in a same-sex relationship; they would be similarly situated—and they would be treated the same,” said the brief.

Friday’s filing comes on the heels of the administration’s plans last week to let federal contractors discriminate against workers by claiming a religious reason and the administration telling the Supreme Court that it’s also legal to fire transgender workers under Title VII.

One of the gay rights cases currently at issue before the Supreme Court is Bostock v. Clayton County, Georgia, in which Gerald Bostock claims he was fired by the county for being gay. His case had been dismissed by lower courts.

His case is consolidated with one filed by Donald Zarda, who sued his employer, Altitude Express, alleging the company terminated him for his sexual orientation. With support from the Equal Employment Opportunity Commission, a federal agency that handles civil rights disputes, he prevailed at the 2nd Circuit Court of Appeals.

"A woman who is subject to an adverse employment action because she is attracted to women would have been treated differently if she had been a man who was attracted to women," the majority wrote last year in an opinion led by Judge Robert Katzmann. "We can therefore conclude that sexual orientation is a function of sex and, by extension, sexual orientation discrimination is a subset of sex discrimination."

In Zarda’s case, however, the Justice Department claimed in a 2017 brief that it “has been settled for decades” that Title VII doesn’t address sexual orientation.

But earlier that same year, Kimberly Hively, a lesbian, won a sex discrimination claim under Title VII. In Hively v. Ivy Tech Community College, the 7th Circuit Court of Appeals ruled: "Hively alleges that if she had been a man married to a woman ... and everything else had stayed the same, Ivy Tech would not have refused to promote her and would not have fired her. ... This describes paradigmatic sex discrimination."

Under former president Barack Obama, the Justice Department asserted that Title VII had a broader scope than just a person’s birth sex, arguing that it protects transgender workers. But the Obama administration never went as far as to say the civil rights law also covered sexual orientation. It had initially opposed the argument outright, claiming that its hands were tied by prior court precedent. Yet in 2016, the Obama administration arguably dialed back its opposition by not trying to dismiss a case brought on those grounds.

Similar to President Donald Trump’s Justice Department, in the Bostock case currently before the Supreme Court, the county contended in a brief filed Aug. 16 that “the original public meaning of the term ‘sex’ at the time Congress adopted Title VII in 1964 was the trait of being male or female, not sexual orientation or homosexuality.”

The county, again sharing the view of the Justice Department, also said that two other cases under Title VII on sex stereotyping and sexual harassment that arguably reflect a broader definition of sex don’t apply here.

Those cases include Price Waterhouse v. Hopkins — a 1989 dispute in which a woman employee claimed she wasn’t promoted because she didn’t appear feminine enough — in which the court found that Title VII’s ban on sex discrimination also bans sex stereotyping in the workplace. The high court also found in Oncale v. Sundowner Offshore Services, Inc. in 1998 that Title VII’s ban on sex discrimination also prohibited workplace harassment in the case of a man who was perceived to be gay.

But saying those cases do not apply, the administration argued on Friday that discriminating on the basis of sexual orientation is not an illegal form of sex stereotyping or associational discrimination.

Sex stereotyping, the brief said, “is forbidden only insofar as it results in disparate treatment of similarly situated members of opposite sexes. For example, one could easily characterize a dress code requiring men to wear neckties as enforcing stereotypes about proper men's business attire.

“An employer who discriminates against employees in same-sex relationships thus does not violate Title VII as long as it treats men in same-sex relationships the same as women in same-sex relationships.”

The Supreme Court will hear oral arguments in all three Title VII cases — two on sexual orientation and one on gender identity — on Oct. 8.