The Trump administration has filed a Supreme Court brief arguing that it should be legal to fire people for being gay.

A brief filed by Solicitor General Noel Francisco this past week addresses two gay discrimination cases, Zarda v. Altitude Express, Inc., and Bostock v. Clayton County.

The first case is about a skydiving instructor, Donald Zarda, who told a female client he was strapped to that he was gay. Her boyfriend complained and Zarda was fired. He filed a complaint with the EEOC saying that he was discriminated against because he was a man who didn’t conform to stereotypes about what a man should be, making his case about sex discrimination under Title VII of the Civil Rights Act.

Gerald Bostock worked for Clayton County, Georgia, and was fired after he was criticized for participating in a gay softball league. He also said that he suffered sex discrimination under Title VII.

Related: The Supreme Court is going to rule on LGBTQ job discrimination. This could end badly.

Some judges have agreed that discriminating based on sexual orientation is a form of sex discrimination, because it’s based on stereotypes of how men and women should behave and because it puts people at a disadvantage because of their sex. That is, if a woman who gets fired because she married a woman but wouldn’t have been fired if she were a man married to a woman, then she lost her job because she’s a woman.

The Trump administration disagrees with this argument, most likely because the Trump administration opposes civil rights protections for LGBTQ people. The brief argues that a woman fired because she is married to a woman should be compared to the treatment a man married to a man would receive, and if they would both be fired then they faced sexual orientation discrimination, not sex discrimination.

Title VII does not mention sexual orientation.

Effectively, their theory of the law would hinder any attempt by courts to stop sex stereotype discrimination. If gender nonconforming men and women should only be compared to gender nonconforming people of the opposite sex, then employers that discriminate across the board based on sex stereotypes are fine, according to the Trump administration’s logic.

Bostock and Zarda are two of the three Title VII LGBTQ discrimination cases that the Supreme Court is hearing this year. Aimee Stephens’s Title VII case – about a woman who fired from a funeral home when she announced her transition – is also going to be heard by the Supreme Court this year.

The Trump administration previously filed a brief arguing that she is not protected by federal law in her case.