Feb. 22 (UPI) — President Donald Trump’s administration on Wednesday announced that it has rolled back former President Barack Obama’s guidelines to give transgender students the right to use whichever public restrooms they are most comfortable with.

The Departments of Justice and Education notified the U.S. Supreme Court Wednesday that it had instructed American schools to disregard the Obama administration’s attempt to grant such access.

“We have a responsibility to protect every student in America and ensure that they have the freedom to learn and thrive in a safe and trusted environment,” Education Secretary Betsy DeVos said in a statement. “This is not merely a federal mandate, but a moral obligation no individual, school, district or state can abdicate. At my direction, the Department’s Office for Civil Rights remains committed to investigating all claims of discrimination, bullying and harassment against those who are most vulnerable in our schools.”

Obama’s guidelines, issued last May, ordered schools nationwide to permit transgender students to choose the bathroom they prefer without restriction. The effort came about after North Carolina passed a law requiring transgender people to use the bathroom of their birth sex.

The Obama administration cited Title IX of federal law that guarantees equality in education.

White House spokesman Sean Spicer hinted at a reversal on Tuesday when he said Trump wants to let individual states determine their own policies on the matter.

“This is an issue best solved at the state and local level,” DeVos said Wednesday. “Schools, communities, and families can find — and in many cases have found — solutions that protect all students.

“As Secretary of Education, I consider protecting all students, including LGBTQ students, not only a key priority for the Department, but for every school in America.”

Texas and 12 other states challenged the Obama directive in court and a judge ultimately blocked it with a temporary restraining order. The Obama administration then requested the block only apply to the 13 states that filed a lawsuit.

Earlier this month, Trump’s administration asked to withdraw a motion filed by Obama over the issue. In a court filing, U.S. Attorney General Jeff Sessions’ Justice Department requested to withdraw a government motion last year asking a judge to scale back the injunction.

Supporters of Obama’s order reacted Wednesday by pledging to continue the fight for LGBT rights.

“Washington, D.C., Is an inclusive city. We will continue to protect and support inclusive policies for our LGBTQIA students,” Mayor Muriel Bowser said on Twitter.

Civil rights groups have also said Trump’s government can do only so much to impact transgender rights.

“Trump’s action sends a terrible message to transgender students. But these students should know the law is on their side,” the American Civil Liberties Union said Wednesday.

“President Trump’s revocation of the guidance, however, does NOT undo legal protections for transgender students.”