The Trump administration rescinded documents Friday meant to guide schools in handling discipline, turning back an Obama-era effort aimed at reducing widespread racial disparities in how students are suspended, expelled and otherwise punished.

The move by the Education and Justice departments was made official Friday but was widely expected. On Tuesday, the Federal Commission on School Safety recommended that the guidance be revoked, citing concerns over its legal foundation.

The guidance, which was not binding, put school systems on notice that they could be violating federal civil rights law if students of color were disciplined at higher rates than white students. It laid out scenarios and explained how they would be viewed by federal authorities. And it offered suggestions for alternatives to discipline that could foster positive school climates.

In its report, the school safety commission criticized the guidance as an example of federal overreach and said it had created unsafe school environments by allowing bad behavior to go unpunished. The report also attacked the legal principle of “disparate impact” that the guidance relied upon — that discrimination can be proved by examining the effects of policies and not just the intention.

Education Secretary Betsy DeVos, who chaired the safety commission, said in a statement that she had heard from teachers that the guidance led to discipline decisions being made based on a student’s race and that “statistics became more important than the safety of students and teachers.”

The decision was met with sharp opposition from Democrats, civil rights advocates and others. Rep. Robert C. “Bobby” Scott (D-Va.), who will chair the House Education Committee next year, said the move will undermine efforts to give all students a quality education.

“The guidance was issued to help schools address the troubling and undeniable evidence that Black students, boys, and students with disabilities receive harsher punishments than their classmates for similar or lesser offenses,” he said in a statement. “Rescinding the guidance will stall, if not reverse our progress toward addressing these disparities.”

He added that by using the school safety commission to justify the decision, the administration is “sending a terrible message that schools are safest when they discriminate against students of color.”

The administration rescinded six documents related to the guidance. The Education Department’s civil rights office issued a question-and-answer document explaining how it will approach discipline investigations. It said schools have an obligation not to treat students differently based on race. In assessing whether discrimination is at work, the office said it would rely on “direct evidence of racial motive or animus,” such as racially biased statements by decision-makers. It said the office would also look at circumstantial evidence of bias and said that might include “comparative evidence regarding the treatment of similarly situated students.”

The department did not publish information on how schools could deal with difficult situations or create programs that foster a positive school environment to combat discipline problems. A spokeswoman said the department is working to provide more “supportive documents” based on the commission’s recommendations.