President Donald Trump’s administration on Wednesday reversed Obama-era policies requiring that public schools allow transgender students to use the bathroom that corresponds with their gender identity. It will now be up to states and school districts to interpret whether federal sex discrimination law applies to gender identity.

A letter sent to schools nationwide Wednesday by the Justice and Education departments says the earlier Obama directive caused confusion and “significant litigation” over how it should be applied. The new letter says the guidance is lifted “in order to further and more completely consider the legal issues involved.”

The letter also says that the withdrawal of the guidance documents “does not leave students without protections from discrimination, bullying, or harassment.”

Get Breaking News Delivered to Your Inbox

“All schools must ensure that all students, including LGBT students, are able to learn and thrive in a safe environment,” the letter says. It adds that the departments of Education and Justice are “committed to the application of Title IX and other federal laws to ensure such protection.”

In a statement, Secretary of Education Betsy DeVos said, “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.”

“I have dedicated my career to advocating for and fighting on behalf of students, and 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,” she said.

Some Democrats, however, quickly spoke out against the Trump administration’s move. House Minority Leader Nancy Pelosi called it an “attack on transgender student protections” and said “this is not a state issue.”

“Withdrawing the historic guidance from the Obama Administration to protect transgender students is a cruel blow to an already vulnerable group of young people,” she said in a statement.

“This move shows that President Trump cannot be trusted to defend the rights of LGBT Americans,” she said. “This is not a state issue. This is an issue of equality for all.”

Rep. Katherine Clark, D-Massachusetts, described the move as “ripping away protections.” Rep. Debbie Wasserman Schultz, D-Florida, accused Mr. Trump of lying in his promise to protect LGBT Americans. Sen. Tammy Baldwin, D-Wisconsin, called it a “step backward.”

Ripping away protections for trans students is not only backwards and cruel, it will make our schools less safe. #ProtectTransKids — Katherine Clark (@RepKClark) February 23, 2017

A step backward by Trump, but federal law has not changed & schools continue to have a legal & moral obligation to protect all students. — Sen. Tammy Baldwin (@SenatorBaldwin) February 23, 2017

The critical remarks were made amid a slew of reaction. Others were supportive of Wednesday’s action.

Texas Attorney General Ken Paxton described the action as “encouraging” and said his office is evaluating what impact it might bear on its ongoing litigation.

“Our fight over the bathroom directive has always been about former President Obama’s attempt to bypass Congress and rewrite the laws to fit his political agenda for radical social change,” Paxton said. “The Obama administration’s directive on bathrooms unlawfully invaded areas that are left to state discretion under the 10th Amendment. School policy should center on the safety, privacy and dignity of its students, not the whims of federal bureaucrats.”

Gary McCaleb, senior counsel for Alliance Defending Freedom, said, “No longer will federal officials distort federal law that is meant to equalize educational opportunities for women, and no longer will they force local officials to intermingle boys and girls within private areas like locker rooms, showers, hotel rooms on school trips, and restrooms.”

Back in May, the Obama administration issued guidance to U.S. public schools that they were required to treat transgender students according to their gender identity, even if that’s different than their birth identity. A study from The Williams Institute at UCLA Law School estimates that there are approximately 150,000 13- to 17-year-olds in the U.S. who identify as transgender.

White House Press Secretary Sean Spicer addressed the issue at his daily briefing on Wednesday, confirming that the Justice Department and the Department of Education were reviewing the existing guidelines and had “several areas of concern, both legal and procedural.”

Mr. Trump “is a firm believer in states rights, and certain issues like this are best not dealt with at the federal level,” Spicer said.

However, Attorney General Jeff Sessions believes, according to CBS News’ Paula Reid, that this is a legal issue and not a policy issue. The Obama administration had originally argued that transgender bathroom use falls under Title IX, the federal law that prohibits sex discrimination in education and education-related activities. However, Sessions believes that “sex” discrimination only refers to the sex on one’s birth certificate and does not include protection for “sexual identity.”

Spicer made that same argument during Wednesday’s briefing.

“There was no discussion of [the transgender issue] back then and to assume certain elements of the law were thought of back then with respect to this would be preposterous,” he said.

The Obama administration’s guidance came shortly after the Justice Department sued North Carolina over a new state law that says transgender people must use public bathrooms that correspond to the sex on their birth certificate, a law the administration said violated the Civil Rights Act.

A federal court had already put the Obama administration’s guidance on hold, so this is not a huge upheaval in day-to-day operations. However, it signals the first major shift in the Department of Justice’s approach to civil rights under a Trump presidency.

The reversal comes just weeks before the Supreme Court is expected to hear a case on transgender students’ bathroom rights.

James Esseks, LGBT project director for the American Civil Liberties Union, said revoking the guidance “shows that the president’s promise to protect LGBT rights was just empty rhetoric.”

“But the bottom line is that this does not undo legal protections for trans students, and school districts can and must continue to protect them and all students from discrimination,” he said. “School districts that recognize that should continue doing the right thing; for the rest, we’ll see them in court.”