The U.S. Education Department says a South Carolina school district has agreed to let a transgender elementary student use the restroom with which she identifies.

The Department's Office for Civil Rights said in a statement that Dorchester District 2 had violated Title IX, which protects students from sex-based discrimination. The office said the district originally had not given access to the girls' bathroom as a result of her transgender status.

The office said the district has agreed to comply with Title IX requirements.

Catherine Lhamon with the U.S. Education Department says she's pleased the district agreed to allow the student to use the restroom of her choice.

District 2 officials didn't immediately comment on the agreement.

Nearby Berkeley County said in April that students can use the restroom with which they identify.