A federal court just revived a “bathroom” case that could wind up making lasting changes to transgender rights in America — far beyond which bathroom schools allow students to use.

US Judge Arenda Wright Allen in Virginia refused the Gloucester County School Board’s request to dismiss Gavin Grimm’s lawsuit against the school board on Tuesday. But Wright Allen went further — suggesting that Grimm is likely to win.

Grimm, a trans teenager, sued his former school board after in 2014 he tried to use the boys’ bathroom in the school and the Gloucester County School Board told him he could only use the girls’ or unisex bathroom.

Grimm claims that the school board’s decision violated the equal protection clause of the US Constitution and Title IX of federal civil rights law. Title IX bans sex discrimination in schools, and advocates argue that since trans discrimination is rooted in beliefs about what people assigned certain sexes at birth should be like, sex discrimination bans also prohibit trans discrimination. Under this rationale, stopping trans students from using the bathroom that aligns with their gender identity singles out trans people for discriminatory treatment.

The federal judge found Grimm “has sufficiently pled a Title IX claim of sex discrimination under a gender stereotyping theory,” that the board’s policy “classified Mr. Grimm differently on the basis of his transgender status and, accordingly, subjected him to sex stereotyping,” and that the board’s “argument that the policy did not discriminate against any one class of students is resoundingly unpersuasive.”

Grimm had previously won at the Fourth Circuit Court of Appeals — in part because the court deferred to the Obama administration’s guidance protecting trans people from discrimination under Title IX. But the Trump administration rescinded that guidance, prompting the Supreme Court to send the case back down to lower courts.

Now the case is back on — and could eventually have staying power about what federal law under Title IX means for trans people. If the case is appealed, it could make its way back through federal courts and perhaps even the Supreme Court. A ruling there could help set a new standard for trans rights in America.

The argument at the core of the case has implications beyond Grimm and schools. If the Supreme Court agrees (as some federal appeals courts already have) that trans discrimination is illegal under sex discrimination bans, that could apply not just to Title IX but also to other federal civil rights laws that ban sex discrimination in the workplace and housing. This would be hugely important, filling a big gap in trans rights today.

Most states don’t explicitly prohibit trans discrimination

Under most states’ laws and federal law, trans people aren’t explicitly protected from discrimination in the workplace, housing, public accommodations, and schools. This means that a person can be fired from a job, evicted from a home, kicked out of a business, or denied the correct bathroom facility just because an employer, landlord, business owner, or school principal doesn’t approve of the person’s gender identity.

LGBTQ advocates argue, however, that federal civil rights law should already shield trans people from discrimination.

The argument: Discrimination against someone based on their gender identity is fundamentally rooted in sex-based expectations. For example, if someone discriminates against a trans woman, that’s largely based on the expectation that a person designated male at birth should identify as a man — a belief built on an idea of what a person of a certain sex assigned at birth should be like. So since federal civil rights laws, such as Title IX, ban sex discrimination in the workplace, housing, and schools, they should ban discrimination against trans people in these settings as well.

This isn’t just a wild interpretation by LGBTQ advocates; there’s legal precedent for it. Joshua Block, an American Civil Liberties Union attorney working on Grimm’s case, cited a 1998 Supreme Court case, Oncale v. Sundowner Offshore Services Inc., in which the Court unanimously agreed that bans on sex discrimination prohibit same-sex sexual harassment. Same-sex sexual harassment was not something the authors of federal civil rights laws considered, but it’s something, the Supreme Court said, that a plain reading of the law protects.

“Oncale says that’s irrelevant whether [Congress] contemplated it,” Block previously told me. “That’s not how laws work. This is literal sex discrimination. Whether or not that’s what Congress was focused on doesn’t make it any less a type of discrimination covered by the statute.”

Several federal appeals courts have agreed to the argument applying sex discrimination bans to trans people. But for it to become the law of the land nationwide, it still must be upheld by the Supreme Court.

The typical argument against trans nondiscrimination protections is a myth

Opponents of nondiscrimination protections for trans people frequently point to a certain facility to make their case: bathrooms.

Specifically, they claim that letting trans people use the bathroom or locker room for their gender identity, as some nondiscrimination laws do, will allow men to disguise themselves as trans women to go into women’s bathrooms or locker rooms and sexually assault and harass women.

But even if trans people are allowed to use the bathroom or locker room that aligns with their gender identity, sexual assault remains illegal.

There’s also no evidence that nondiscrimination laws — and other policies that let trans people use the bathroom for their gender identity — lead to sexual assault in bathrooms and locker rooms. In two investigations, the left-leaning media watchdog organization Media Matters confirmed with experts and officials in 12 states and 17 school districts with protections for trans people that they had no increases in sex crimes after they enacted their policies.

Opponents of nondiscrimination laws counter that there are some examples of men sneaking into women’s bathrooms to attack women. But as PolitiFact reported, none of the examples cited in the US happened after a city or state passed a nondiscrimination law or otherwise let trans people use the bathroom or locker room for their gender identity. Instead, these seem to be examples of men doing awful things regardless of the law — which has, unfortunately, happened since the beginning of civilization.

One example is a case in Toronto, Canada, which now has a nondiscrimination law, in which a man disguised himself as a woman and attacked women in shelters. But the attacks happened months before Ontario (Toronto’s province) protected trans people in a nondiscrimination law. So the law couldn’t have been the cause.

While the issue is now being used primarily against trans people, historically bathroom fears have been regularly deployed against civil rights causes. They were used against black people to justify segregation — by invoking fears that black men would attack white women in bathrooms. And they were used to stop the Equal Rights Amendment, which tried to establish legal equality between men and women, because opponents claimed it would lead to the abolition of bathrooms for different genders, potentially putting women in danger.

Some people are also, frankly, just bothered by the idea that someone in the same bathroom or locker room won’t have the same genitalia as them.

This gets to the heart of the issue: Bathrooms are places where really private things happen, and that makes people feel vulnerable in all sorts of ways. “People are afraid because they’re exposed,” Kathryn Anthony, author of Designing for Diversity: Gender, Race and Ethnicity in the Architectural Profession, told the Guardian. “There’s a vulnerability we feel in public restrooms we don’t feel in other places.”

But a lot of things happen in public bathrooms that people aren’t comfortable with — and people have managed to deal with it to accommodate others’ rights and needs.

So if it’s not harming anyone, perhaps it’s best, LGBTQ advocates argue, to let trans people use the facility for their gender identity without making them feel ostracized and discriminated against. (Discrimination is a huge contributor to gender dysphoria, a medical condition that some trans people experience that can cause depression, anxiety, and even suicidal ideation.)

One federal court, at least, agrees with Grimm so far — and that could have big implications not just for him but for all trans people in America.