A transgender high school student is suing the Evansville Vanderburgh School Corp. over a policy that bars him from using the boys’ restroom.

The 17-year-old, who goes by the initials J.A.W., is asking U.S. District Judge William Lawrence, of the Southern District of Indiana, to issue an injunction halting the school district’s policy.

Currently, students may only use restroom and locker room facilities that match the gender on their birth certificate. If they choose not to use those facilities, they can use single-stall restrooms, reports the Evansville Courier & Press.

Only two people testified at a 90-minute hearing last week: J.A.W. and EVSC Superintendent David Smith. J.A.W. told the court that, thus far, the school district has accommodated his requests to be treated according to his gender identity, including how he should be addressed and how he may dress. But the school district has refused to allow him to use the male restroom.

On the stand, J.A.W. said he feels “ostracized” by his peers because he either has to use the female restroom despite presenting as a male, or small unisex bathrooms that are in locations that are further away from classrooms. Since being diagnosed with gender dysphoria, he has begun a regimen of hormones to help him transition and develop male characteristics.

But the school district insists that it is only following state law, and that J.A.W.’s legal documents and driver’s license still designate him as female. Smith testified that unless J.A.W. has his birth certificate changed, he could be disciplined for using the male restroom.

Smith added that if schools used “subjective rule” in governing bathroom policy, “it would result in chaos.”

Pat Shoulders, the attorney for EVSC, told reporters that Indiana law requires that children are enrolled in school based on the sex listed on their birth certificates.

“Sex is assigned by health authorities. It’s assigned by the motor vehicle department,” Shoulders said. “The school district doesn’t want to be put in a position of second-guessing that or making a decision different than those made by legal authorities.”

But Ken Falk, an attorney with the American Civil Liberties Union of Indiana, says that J.A.W was born outside of Indiana, in a state that does not issue changes in gender markers on birth certificates until the person in question can confirm they’ve undergone gender confirmation surgery.

Falk argued in court that EVSC’s policy has caused J.A.W. “harm and distress,” and that his rights were violated under both the Fourteenth Amendment and Title IX. Falk pointed to a similar case that was recently heard by the 7th U.S. Circuit Court of Appeals — which oversees courts in Indiana — noting that the court ruled in favor of a transgender boy from Wisconsin who sued his school district over a policy barring him from the boys’ restroom.

The school district in that case subsequently decided to settle with the student, allowing him to use the boys’ restroom as part of the final agreement.

“J.A.W. is a young man and should be treated as such,” Falk told reporters.

EVSC has previously sought to dismiss the lawsuit in June, but Lawrence rejected that request and allowed the case to go forward. Lawrence did not rule immediately on the request for an injunction, but said he’d likely issue a decision in the next few weeks, before the start of school.

See also: Maryland school district settles lawsuit brought by transgender student