An Illinois school district may face sanctions over its refusal to let a female transgender student use the girls' locker room, a decision the U.S. Department of Education says constitutes a violation of federal anti-discrimination laws.

Township High School District 211, located in Palatine, Illinois, failed to comply with Title IX, the law that prohibits sex discrimination, officials alleged, according to Yahoo Health. The department, which conducted a two-year investigation into the incident, said the move caused the transgender teenager "isolation," "ostracism" and at least one "tearful breakdown," the Washington Post reported.

"The denial of access has also meant that, in order to satisfy her graduation requirements and receive a high school diploma, (the unidentified student) has had no other option but to accept being treated differently than other students by the District," the 14-page report from the U.S. Department of Education's Office for Civil Rights said.

Officials in the school district now have 30 days to reach a solution or face consequences that could range from administrative law proceedings to court action brought by the U.S. Department of Justice, according to The New York Times. Eventually, it could lose some or all of its Title IX funding.

Catherine Lhamon, the Education Department's assistant secretary for civil rights, meanwhile, reiterated the agency's tough stance when it comes to enforcing anti-discrimination laws.

"All students deserve the opportunity to participate equally in school programs and activities - this is a basic civil right," Lhamon said.

"Unfortunately, Township High School District 211 is not following the law because the district continues to deny a female student the right to use the girls' locker room."

The student who originally brought the complaint was born male but has identified as female for many years. The school district has honored her preference to go by a female name and pronouns, and she also uses women's restrooms.

"What our client wants is not hard to understand," said John Knight of the American Civil Liberties Union of Illinois, who is representing the teenager. "She wants to be accepted for who she is and to be treated with dignity and respect -- like any other student."