Civil rights groups slammed Education Secretary Betsy DeVos for saying Tuesday that schools can decide whether to report undocumented students to immigration enforcement officials, saying her statements conflict with the law and could raise fears among immigrant students.

DeVos’s answers came during testimony before the House Committee on Education and the Workforce. Rep. Adriano Espaillat (D-N.Y.), an immigrant from the Dominican Republic who was at one time undocumented, pressed the secretary for her positions on immigration enforcement.

“Inside the school,” Espaillat asked, “if a principal or a teacher finds out that a certain child is undocumented, or his or her family members are undocumented, do you feel that the principal or teacher is responsible to call [Immigration and Customs Enforcement] and to have that family reported?”

“Sir, I think that’s a school decision,” DeVos responded. “That’s a local community decision. And again, I refer to the fact that we have laws and we also are compassionate, and I urge this body to do its job and address or clarify where there is confusion around this.”

Not so, say civil rights groups. The Supreme Court made clear in Plyler v. Doe that public schools have a constitutional obligation to provide schooling for children, regardless of immigration status. That means schools also cannot enforce measures that would deter undocumented children from registering. They cannot ask about immigration status. And according to the American Civil Liberties Union, they cannot report students or their families to Immigration and Customs Enforcement.

“Let’s be clear: Any school that reports a child to ICE would violate the Constitution. The Supreme Court has made clear that every child in America has a right to a basic education, regardless of immigration status,” Lorella Praeli, the ACLU’s director of immigration policy and campaigns, said in a statement. “Secretary DeVos is once again wrong.”

The Supreme Court ruling has not prevented some states from attempting to bar undocumented children from their schools. California voters in 1994 passed Proposition 187, which required schools to kick out undocumented students and to report students they suspected of being undocumented to federal authorities, but the law was struck down in federal court.

Alabama in 2011 passed a measure requiring school districts to ask all students about their immigration status and report their findings to the state. The federal government and others challenged the law, saying it violated Plyler because it preceded an uptick in absenteeism among Latino students. A federal appellate court blocked its implementation two years later.

Legal experts said DeVos’s stance marks a major turnabout in the Education Department’s position on Plyler and contravenes the way federal courts — even in conservative jurisdictions — have interpreted the law. Under the Obama administration, Arne Duncan, who was education secretary, and Eric Holder, who was attorney general, issued guidance to schools reminding them of their obligation to educate all children, regardless of immigration status. And those officials warned schools that they would violate federal law if they required things an undocumented immigrant might lack, such as a U.S. birth certificate or a Social Security number.

“We have become aware of student enrollment practices that may chill or discourage the participation, or lead to the exclusion, of students based on their or their parents’ or guardians’ actual or perceived citizenship or immigration status,” they wrote. “These practices contravene federal law.”

The Mexican American Legal Defense and Educational Fund said DeVos “desperately needs competent legal advice.”

“Her testimony today about reporting students to ICE stems either from an astounding ignorance of the law or from an insupportable unwillingness to accurately advise local school districts,” said Thomas A. Saenz, president and general counsel of the group. Under the Plyler decision, “Any public school or school district that denies an education to any undocumented child — whether by refusing to enroll, by limiting access to the programs and benefits provided to other students, or by reporting a child to ICE — has violated the United States Constitution.”

Lily Eskelsen García, president of the National Education Association, the nation’s largest teachers union, declared the matter “settled constitutional law.”

“Betsy DeVos should know better, and to suggest otherwise only serves to frighten children,” Eskelsen García said.

Asked to respond to the backlash, Education Department spokeswoman Elizabeth Hill said: DeVos “has repeatedly said that DACA students have the right to a K-12 education, as ruled on by the Supreme Court.” Hill used the acronym for the Deferred Action for Childhood Arrivals program, which provides two-year, renewable work permits and deportation protections for about 690,000 “dreamers,” undocumented immigrants brought to this country as children.

“She has tremendous compassion for DACA students and has said repeatedly she hopes that Congress would do its job and give these students the certainty they deserve,” Hill said.

Asked whether DeVos believed Plyler would permit schools to call immigration authorities on undocumented students, Hill added that “the secretary’s position remains that schools must comply with Plyler and all other applicable law and regulation.”

The exchange comes as the immigration debate reaches a fever pitch, with President Trump threatening to jail leaders of sanctuary cities and an increase in immigration enforcement. In some places, schools have also reassured community members that they will not permit immigration agents on school grounds, nor will they turn student records over to the immigration agency without a subpoena.

Historically, immigration agents have avoided schools. A 2011 memo advises agents to avoid enforcement activities at “sensitive locations,” including at schools, hospitals and churches.

Uncertainty around immigration laws — including the DACA program — looms large for schoolchildren and their parents. The Pew Research Center estimates 3.9 million schoolchildren had an unauthorized immigrant parent in 2014 — or 7.3 percent of all schoolchildren. About 725,000 of those children were unauthorized immigrants.

Espaillat also grilled DeVos about accounts of immigration agents arresting parents near schools. DeVos declined to say whether she supported the Trump administration’s enforcement actions.

“We are a nation of laws and a nation of compassionate people,” DeVos said. “I think it’s important that we follow the laws of the land, and if it’s important that laws be changed, this body can do so.”