NEW YORK – New York officials are forcing 20 upstate school districts to change their enrollment practices after a review showed many imposed illegal barriers for immigrant students.

The New York Times reports the state took in about 6,500 unaccompanied immigrant minors between October 2013 and the end of 2014, but many were denied admission to public schools based on illegal enrollment practices that require them to submit Social Security cards or proof of residency.

The findings, documented in a joint review by the State Education Department and the attorney general’s Civil Rights Bureau, show school officials ignored repeated instructions from state and federal law enforcement to implement barriers that effectively excluded undocumented immigrant students.

MORE NEWS: Know These Before Moving From Cyprus To The UK

Those barriers included requiring proof of district residency, demanding students furnish Social Security cards and visa expiration dates, and limiting access for immigrant families to enrollment offices –  measures that violate the 1982 Supreme Court decision Plyler v. Doe prohibiting schools from denying access based on immigration status, according to the Times.

“What our work shows is that in every community there is the potential for students to encounter barriers,” Kristen Clarke, chief of the New York attorney general’s Civil Rights Bureau. “We were very struck to find ones that had policies which, on their face, violated the law.”

To fix the problem, Attorney General Eric Schneiderman required districts to agree to new polices on enrolling immigrant students that prohibit inquiries about citizenship or immigration status, and require school officials to report admission denials to the state through June 2018, LoHud.com reports.

“Schoolhouse doors must be open to all students in our diverse state, regardless of their immigration status,” Schneiderman said in a statement. “More than 30 years after the Supreme Court guaranteed the free public education for undocumented children, we must do everything we can to uphold the law and ensure equal access for all our students.”

Yet despite the crack down on enrollment policies, some districts have apparently continued to ignore the law.

“The acting commissioner of the Education Department, Elizabeth Berlin, sent on order to the Hempstead Union Free School District on Long Island Wednesday that threated to remove school officials if the district did not comply,” the Times reports.

MORE NEWS: How to prepare for face-to-face classes

“Among the department’s demands were to ‘immediately ensure that the district’s enrollment office is open, with doors unlocked, during its hours of operation.’”

The Hempstead district has faced criticism from immigration advocates who allege dozens of students were denied a spot in class, claiming school officials instructed the new students – mostly immigrants – to simply sign in for attendance and go home, the Times reports.

“Since then, the state had found evidence that between 57 and 59 students were prevented from enrolling, a spokesman for the Education Department said. Investigators have also alleged that the district failed to provide adequate instruction to non-English-speaking students, and discouraged students by requiring residency documentation,” according to the news site.

“The district has ignored calls from the attorney general and the department to identify those students, spokesmen for the two offices said.”