A gender neutral sign is posted outside a bathroom in Durham, N.C. The debate over transgender bathroom access has spread nationwide; the Department of Education is now increasing pressure on school districts to allow children to use the bathroom that coincides with their gender identity. (Sara D. Davis/Getty Images)

Facing pressure from the U.S. Department of Education, a South Carolina school district has agreed to allow a transgender student to use the bathroom of her choice and will revise its policies to bar discrimination based on gender identity.

The department’s Office of Civil Rights found that Dorchester County School District Two, located outside of Charleston, violated the rights of the transgender student — who was born male and now identifies as a girl — when it barred her from using the girls’ bathroom. The federal agency concluded that the district violated Title IX, which bars discrimination on the basis of sex in public schools.

As part of an agreement with the government, Dorchester County school officials will allow the student to use the girls’ bathroom and, if the girls’ family requests it, establish a support team to ensure she has access to all programs and activities at school.

Dorchester County school officials did not immediately respond to a request for comment Tuesday evening.

School bathrooms have become the latest frontier in the fight for LGBTQ rights, and the debate over how to accommodate transgender students in school bathrooms has spurred a flurry of lawsuits and state laws requiring people to use bathrooms that align with the sex listed on their birth certificate.

The Obama administration helped fuel the debate over accommodations for transgender students in May, when the Education and Justice departments issued a guidance letter directing all of the nation’s public schools to permit students to use bathrooms that align with their gender identity. LGBT activists embraced the administration’s move as a critical protection for vulnerable students, but school officials and politicians rebuked it as an invasion of privacy.

Officials in 11 states filed a lawsuit calling the guidance an overreach of the administration’s authority. South Carolina is not among the states that sued, however, and Gov. Nikki Haley has said that she does not believe that the state needs a law that would limit transgender students’ bathroom access, requiring them to use facilities that correspond to their biological sex.

“This is not a battle that we have seen is needed in South Carolina,” Haley said in April, according to the Post and Courier newspaper in Charleston.

School districts that defy the Education Department’s directive risk losing their federal funding; faced with that prospect, most districts agree to do what federal officials ask of them.

In 2013, the Education Department found a California school district in violation of Title IX for requiring a transgender boy to change clothes and use the bathroom in the nurse’s office. In 2015, an Illinois school district said it would defy the Education Department’s directive to allow a transgender girl access to the girls’ locker room. But Palatine Township High School District 211 — facing the prospect of losing millions of dollars in federal funding — eventually allowed the girl to use the locker room.

A group of Illinois students, including some from Palatine Township High School, have sued the Obama administration, arguing that the Obama administration’s position violates students’ fundamental right to privacy.

The Dorchester County school system had been under investigation since August 2015, when the Education Department’s Office of Civil Rights received a complaint.

The parents of the student in Dorchester County said that though she was born a boy, she “never exhibited male traits” and began wearing dresses to school, according to the Education Department’s summary of its findings. Teachers agreed to refer to her by her new name in the classroom, but the student’s male name continued to show up on standardized tests and other district documents.

Dorchester officials eventually agreed to change the student’s name in district records, during the federal investigation and after the student’s parents petitioned a court to officially change her name.

But school officials would not allow the student to use the girls’ bathroom and forced her to instead use one of several private bathrooms located in the nurse’s station, the assistant principal’s office, and a work room.

“This embarrassed the student because she was forced to separate from her friends, who would often request to accompany her to the restroom, and because it required the student to address questions from her classmates about why she was using a different restroom,” Education Department officials wrote in their summary of the case.

Earlier this month, President Obama said that his directive to schools was based on his “best interpretation of what our laws and our obligations are.”

“What happened and what continues to happen is you have transgender kids in schools. And they get bullied. And they get ostracized. And it’s tough for them,” Obama said, speaking at a town hall broadcast on PBS.

“We should deal with this issue the same way we would want it dealt with if it was our child and that is to try to create an environment of some dignity and kindness for these kids.”