WASHINGTON — President Trump on Wednesday rescinded protections for transgender students that had allowed them to use bathrooms of their gender identity, overruling his own education secretary and placing his administration firmly in the middle of the culture wars that many Republicans have tried to leave behind.
In a joint letter, the top civil rights officials from the Justice Department and the Department of Education rejected the Obama administration’s position that nondiscrimination laws require schools to allow transgender students to use the bathrooms of their choice.
That directive, they said, was improperly and arbitrarily devised, “without due regard for the primary role of the states and local school districts in establishing educational policy.”
Massachusetts has its own transgender public accommodations measure, signed into law in July , that allows people to use bathroom facilities based on their gender identity.
Because of this law, “protections for schools and families will remain in place for the Commonwealth,” said Lizzy Guyton, communications director for Governor Charlie Baker.
Angela Dallara, a spokeswoman for Freedom Massachusetts, said though the Trump decision will not change anything “practically speaking,” it has a symbolic implication for the state.
The question of how to address the bathroom debate, as it had become known, opened a rift inside the Trump administration, pitting Education Secretary Betsy DeVos against Attorney General Jeff Sessions.
Sessions, who had been expected to move quickly to roll back the civil rights expansions put in place under his Democratic predecessors, was insistent that his Justice Department act decisively because of two pending court cases that could have upheld the protections and pushed the government into further litigation.
But DeVos initially resisted signing off and told Trump she was uncomfortable because of the potential harm that rescinding the protections could cause transgender students, according to three Republicans with direct knowledge of the internal discussions.
DeVos sent a Tweet on the matter Wednesday night.
Sessions, who has opposed expanding gay, lesbian, and transgender rights, pushed DeVos to relent. After getting nowhere, he took his objections to the White House because he could not go forward without her consent. Trump sided with his attorney general, the Republicans said, and told DeVos in a meeting in the Oval Office on Tuesday that he wanted her to drop her opposition.
DeVos, faced with the choice of resigning or defying the president, agreed to go along.
DeVos’s unease was evident in a strongly worded statement Wednesday night that said she considered it a “moral obligation” for every school in America to protect all students from discrimination, bullying, and harassment.
She said she had directed the Education Department’s Office for Civil Rights to investigate all such claims “against those who are most vulnerable in our schools” but also insisted that bathroom access was not a federal matter.
“This is an issue best solved at the state and local level,” DeVos said. “Schools, communities, and families can find — and in many cases have found — solutions that protect all students.”
Gay rights supporters made their displeasure clear as well. Outside the White House, several hundred people protested the decision, chanting, “No hate, no fear, trans students are welcome here.”
The dispute highlighted the degree to which transgender rights issues, which Trump expressed sympathy for during the campaign, continue to split Republicans, even as many in the party argue it is time to move away from social issues and focus more on bread-and-butter pocketbook concerns.
Within the administration, it also threatens to become another distraction for Trump after a tumultuous first month in office. And it shows how the president, who has taken a more permissive stance on gay rights and same-sex marriage than many of his fellow Republicans, is bowing to pressure from the religious right.
Social conservatives, one of Trump’s most loyal constituencies, applauded his move to honor a campaign pledge. They have argued that former president Barack Obama’s policy would allow potential sexual predators access to bathrooms and create an unsafe environment for children.
“President Trump is keeping the shredders busy with his predecessor’s radical policies and orders,” said Tony Perkins, president of the Family Research Council.
But supporters of transgender rights said the Trump administration was acting recklessly and cruelly. “The consequences of this decision will no doubt be heartbreaking,” said Chad Griffin, president of the Human Rights Campaign. “This isn’t a states’ rights issue, it’s a civil rights issue.”
The bathroom debate emerged as a major issue last March when North Carolina passed a bill barring transgender people from using bathrooms that do not match the sex on their birth certificate.
It was part of a broader bill eliminating antidiscrimination protections for gay and transgender people.
LGBT issues became a point of attack for opponents of DeVos’s nomination last month, as Democrats questioned her about the extensive financial support that some of her relatives — part of her wealthy Michigan family — have provided to anti-LGBT causes. DeVos distanced herself from her relatives on the issue, saying their activities did not represent her views.
While the order amounts to a significant rollback of transgender protections, it does include language stating that schools must protect transgender students from bullying — a provision DeVos asked be included, one person with direct knowledge of the process said.
Globe correspondent Felicia Gans contributed to this report.