The Trump administration has ended landmark federal protections for transgender students that instructed schools to allow them to use bathrooms matching their gender identities.
Stepping into an emotional debate, the administration backed states' rights on Wednesday, lifting guidelines issued by the Obama administration.
It will now be up to states and school districts to determine whether students should have access to restrooms according to their chosen gender identity and not just their biological sex.
"This is an issue best solved at the state and local level," Education Secretary Betsy DeVos said.
"Schools, communities and families can find - and in many cases have found - solutions that protect all students."
In a letter to schools, the Justice and Education departments says the earlier guidance "has given rise to significant litigation regarding school restrooms and locker rooms".
The agencies have withdrawn the guidance to "in order to further and more completely consider the legal issues involved".
Anti-bullying safeguards will not be affected by the change, according to the letter.
It was not clear what immediate impact the change would have on schools, as a federal judge in Texas put a temporary hold on the Obama guidance soon after it was issued - after 13 states sued.
Even without that hold, the guidance carried no force of law, but transgender rights advocates say it was necessary to protect students from discrimination.
Opponents argued it was federal overreach and violated the safety and privacy of other students.
White House spokesman Sean Spicer said President Donald Trump "is a firm believer in states' rights and that certain issues like this are not best dealt with at the federal level".
Conservative activists hailed the change, saying the directives were illegal and violated the rights of fixed-gender students, especially girls who did not feel safe changing clothes or using restrooms next to anatomical males.
"Our daughters should never be forced to share private, intimate spaces with male classmates, even if those young men are struggling with these issues," said Vicki Wilson, a member of Students and Parents for Privacy.
However, the reversal is a setback for transgender rights groups.
"Reversing this guidance tells trans kids that it's OK with the Trump administration and the Department of Education for them to be abused and harassed at school for being trans," American Federation of Teachers president Randi Weingarten said.
Activists protested the move outside the White House.
"Respect existence or expect resistance," one placard read.
The Obama administration's guidance was based on its determination that Title IX, the law prohibiting sex discrimination in education, also applies to gender identity.
US Attorney General Jeff Sessions said in a statement the guidance did not sufficiently explain its interpretation of that law.