Some schools. such as Santee Education Complex high school in Los Angeles, are beginning to offer gender-neutral restrooms. (Lucy Nicholson/Reuters)

The Transgender Law Center last week threatened to sue a South Carolina school district for allegedly suspending a transgender boy for using a boys’ bathroom at his high school.

Now, the advocacy group says that Horry County Schools has reversed course, agreeing to expunge the suspension from the student’s record and allow all students to use bathrooms that match their gender identity. The school system also agreed to inform all faculty of transgender students’ bathroom access rights, the law center said.

“We thank Horry County Schools for finally turning around and doing the right thing by committing to treat transgender students fairly,” Kris Hayashi, the Transgender Law Center’s executive director, said in a statement. “It is both illegal and wrong to ban transgender students from using the restroom matching the gender they live as every day. The law is clear, and we expect other districts to follow their lead and fall in line — or face the legal consequences.”

Bathroom access has become a heated front in the culture wars over LGBT rights, sparking emotional debates in several states, most notably North Carolina, where a law banning local protections for LGBT people has triggered protests. The Obama administration, meanwhile, has argued that Title IX protects students’ rights to use bathrooms in accordance with their gender identity, and this month Court of Appeals for the 4th Circuit deferred to that interpretation in the case involving a Virginia student.

The Transgender Law Center described Horry County Schools as the first district in the nation to change its approach to transgender students’ bathroom access following the 4th Circuit’s ruling.

Teal Britton, a spokeswoman for Horry County Schools, said she could not validate the law center’s version of events or comment on any case involving a particular student, citing student privacy rules.

But she said that the district does intend to comply with the spirit of the recent federal appeals court ruling, which allowed a lawsuit brought by a Virginia transgender teen — who had been barred from using the boy’s bathroom at his school — to proceed.

A statement from the school system put it this way: “Horry County Schools has not changed the male and female bathroom policies for our students. We have merely determined that transgender students in our schools, along with parents, can request bathroom rights that align with the recent court ruling. Our school administrators, in order to comply with the law and consider the rights of individual students, will make decisions with those students and their parents that are both fair and legal.”

According to the law center, the student — identified only as R. — had begun using the boy’s bathroom in middle school and had continued to do so throughout his first three years at Socastee High School. But in his senior year, following a teacher’s complaint, he was told to use the girls’ bathroom or a bathroom in the nurse’s office. He was suspended in January when he used a boys’ bathroom during a pep rally, according to the law center.

The student left Horry County Schools after the suspension, according to the law center, to complete his senior year in an online school.

“We’re in school to learn,” the student said in a statement. “We should be able to use the bathroom when we need to without worrying about a teacher following us or policing which bathroom we use.”