An Illinois school district that, under Barack Obama's transgender advocacy, allowed boys who identify as girls to use the girls' facilities, now must defend its policy in a lawsuit by parents.

The lawsuit names the Township High School District No. 211 and its activism, which left girls being confronted by a nude male.

The district's actions went far beyond accommodation into activism, explained a ruling Friday from U.S. District Judge Jorge Alonso, who allowed the case against the district to move forward.

The judge wrote that there was a boy in the district, Student A, who insisted he is a girl and demanded access to the girls' facilities.

TRENDING: Growing list of white liberals caught pretending to be black

"The reason District 211 allowed Student A to use the girls' locker rooms is because it was used by females. Had the girls' locker rooms not been limited to females, District 211 would not have been able to affirm Student A's gender by allowing her also to use the girls' locker rooms," the judge said.

"After District 211 allowed Student A to use the girls' locker rooms, an SPP parent requested that her daughter be allowed to use a private locker room. The district refused."

The Alliance Defending Freedom said the policy amounts to sexual harassment.

"We need a compassionate approach to protecting students' privacy, and we welcome the court's decision to allow key claims to move forward," said ADF Legal Counsel Christiana Holcomb. "The district officially authorizes opposite-sex use of school privacy facilities, and that violates Title IX. Letting boys into girls' showers, restrooms, and locker rooms is sexual harassment. Students should be confident that their school will protect their privacy and dignity. So far, this school district has failed to do so."

The Obama administration issued a rule in May 2016 that said Title IX protects the right of transgender students to use restrooms and locker rooms according to "gender identity." Any school that did not abide by the guidance was subject to losing federal funding. But when President Trump was elected, his administration immediately rescinded the rule.

ADF said the district "opened its schools' restrooms to the opposite sex – without informing parents – and then opened the girls’ locker room to a boy after the Obama administration's Department of Education threatened the district's federal funding."

The Trump administration "restored the understanding that under Title IX, 'sex' means male or female and not one's beliefs about their gender."

The 1972 law prohibits schools from discriminating on the basis of "sex," and the Obama administration dictated that lawmakers nearly five decades ago meant that that would include "gender identity."

Critics of that position say Congress in 1972 used "sex" to mean "sex," as in male or female.

In fact, Title IX's existing regulations specifically state that a school receiving federal funds can "provide separate toilet, locker room, and shower facilities on the basis of sex" without putting that funding at risk.

The judge disallowed some claims, and allowed others, but left the challenges to the school's "affirmation policy allowing all transgender students to use the restrooms and locker rooms (including showers) of their choice."

On its face, the policy is discriminatory because it then also requires "all other students must use the restrooms and locker rooms designated for their sex."

The judge pointed out that when the district created its rules, it "did not investigate the reliability of the science underlying gender-affirmation treatments. Nor did it make any effort to understand the impacts such a policy would have on students exposed to opposite-sex, same-gendered students in locker rooms and restrooms."

Even worse, "District 211 has conveyed to students that when a person objects to the compelled affirmation policy, the person is intolerant and bigoted."

The judge noted the district told those who disagreed that they should leave.

The same fight is going on in Pennsylvania, where the Doe v. Boyertown case has been submitted to the U.S. Supreme Court.

ADF explained the issue is bigger than one school's showers.

"If our government is powerful enough to command innocent school children to disrobe in the presence of opposite-sex classmates, then there will be little it will not be powerful enough to do. The restroom policy and locker room agreements thus threaten our very liberty to live our lives in accordance with the most basic expectations of common decency, dignity, and privacy in our bodies."