Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

In a complete reversal of the Obama administration's position, President Donald Trump's administration formally rescinded past guidance on transgender bathroom protections in public schools.

Letters from the Justice and Education departments late Wednesday notified the Supreme Court and the nation's public schools that the administration is changing its position on the issue.

Former President Barack Obama instructed public schools that they must allow transgender students to use bathrooms and locker rooms that align with a child's chosen gender identity. The guidance was issued as an interpretation of Title IX, which prohibits sex discrimination in education.

Now, the administration is revoking key guidance on which that policy was based. The letter informs the court that the Justice Department's Civil Rights Division will no longer "rely on the views expressed in that guidance, and instead will consider further and more completely the legal issues involved."

The two federal departments advise their belief that "there must be due regard for the primary role of the States and local school districts in establishing educational policy."

In addition, the letter knocks down the past administration's interpretation of transgender rights as an extension of Title IX by saying the Obama administration's guidance did not "contain extensive legal analysis or explain how the position is consistent with the express language of Title IX, nor did they undergo any formal public process."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The letter to schools will have no immediate effect, because the Obama policy was blocked by a federal court shortly after it was issued last May, Education Secretary Betsy DeVos noted in a statement.

DeVos said the decision was needed to "protect every student in America and ensure that they have the freedom to learn and thrive in a safe and trusted environment."

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

Schools, communities, and families can find – and in many cases have found – solutions that protect all students. — Betsy DeVos (@BetsyDeVosED) February 23, 2017

The change comes as the Supreme Court is set to hear oral arguments on a case dealing directly with the issue on March 28. The case in question is that of Gavin Grimm, a transgender teen who sued the Gloucester County, Virginia, school board for the right to use the boys' bathroom.

Grimm's lead attorney before the Supreme Court, American Civil Liberties Union senior staff attorney Joshua Block, said: "While it's disappointing to see the Trump administration revoke the guidance, the administration cannot change what Title IX means."

"We're confident that that the law is on Gavin's side and he will prevail just as he did in the Fourth Circuit," Block said.

Human Rights Campaign Legal Director Sarah Warbelow told NBC News on Wednesday afternoon that in light of the move by the White House, her group's focus is now on that case.

Gavin Grimm stands on his front porch during an interview at his home in Gloucester, Virginia. Steve Helber / AP

White House Press Secretary Sean Spicer said Wednesday during his daily briefing that the administration's action would be in accordance with Trump's states' rights stance. On this issue, Spicer said, "he is a firm believer in states' rights and that certain issues like this are not best dealt with on the federal level."

Protests erupted outside the White House and transgender rights groups reacted swiftly with statements of outrage. Mara Keisling, executive director of the National Center for Transgender Equality, said the reversal "sends a harmful message to transgender young people —that their government does not support them, and that it is fine to single out those who are different."

"That message is sure to empower bullies," Keisling said. "But it does not change the legal and moral duty of schools to support all students."

The Congressional LGBT Caucus said in a statement that the move undermined "years of court opinions and best practices developed by experts in the field."

"This President, who previously promised to maintain LGBT nondiscrimination protections, has turned his back on the transgender community and shown a willful disregard for the safety of transgender students everywhere," the statement said.

During the presidential campaign, Trump extended a temporary olive branch to the transgender community, breaking with GOP orthodoxy on the North Carolina bathroom bill, HB2. In an interview with NBC's TODAY, Trump said that the bill was causing economic "strife" in the state and that "there have been very few complaints the way it is."

"People go, they use the bathroom that they feel is appropriate. There has been so little trouble," Trump said in April 2016. He also said transgender icon Caitlyn Jenner could use whatever bathroom she wanted if she visited a Trump property. She later took him up on the offer.

But then Trump shifted his stance to a decidedly states' rights position, telling Fox News' Sean Hannity one day after his TODAY appearance that "local communities and states should make the decision, and I feel very strongly about that. The federal government should not be involved."