An Idaho superintendent has issued a public apology to students and their parents after staff at a public elementary school dressed up as Mexicans and the border wall for Halloween.

The images began circulating on social media this week, and they depict more than a dozen adults dressed up in two groups at Middleton Heights Elementary School, a town of about 7,500 residents 30 miles west of Boise. One group is dressed up as stereotypes of Mexicans, replete with maracas, ponchos, sombreros and fake mustaches. The other group is dressed as a wall plastered with the slogan “Make America Great Again.”

“I want to say we are better than this,” Superintendent Josh Middleton said in a Facebook video Friday. “We embrace all students. We have a responsibility to teach and reach all students, period. Do I think that there was a malicious intent in this poor decision? No, I don’t. Was there a poor judgment involved? Absolutely. And we now have to own those decisions.”

The story quickly took off on Friday evening, drawing coverage in national news media outlets. Angry reactions flooded the school’s Facebook page. And social media responses were harsh.

“The fact that these elementary-school teachers thought this would be OK demonstrates how much more cultural competence training is needed in education,” Kevin Nadal, a psychology professor at John Jay College of Criminal Justice, wrote on Twitter.

Middleton said that he had been alerted to the issue by a parent who expressed concern over the costumes and that he has since opened a district investigation into the matter.

“I was shown those photos and deeply troubled by the decision by our staff members to wear those costumes that are clearly insensitive and inappropriate,” he said. “Right now our time is going to be devoted to investigating those events and those poor decisions that were made.”

According to the Idaho Statesman, the photos were originally posted on the Middleton School District’s Facebook page with a caption reading, “It was a great day to be a Heights Hawk! We celebrated our RESPECT character winners, single and double marathon runners.”

The Halloween incident is another data entry in the long list of controversial, racially insensitive or historically ignorant costumes that inevitably get trotted out every year. But this incident also struck at the heart of an emotional political debate over immigration that has only grown more bitter in recent days in the lead-up to Tuesday’s elections, as President Donald Trump has warned of an immigrant “invasion” and released a misleading ad about immigrants that was widely criticized as racist.

Twelve advocacy organizations, including the ACLU’s chapter in the state, sent a letter to the district expressing concern about the costumes, the Statesman reported.

“Regardless of the intent of a teacher’s actions in the classroom, we must focus on and give weight to the impact of such actions on the students who rely on teachers and other school officials for guidance and support throughout their educational experience,” the ACLU of Idaho said in a statement. “School districts, their staff and other agents have obligations under federal law, state law and district policies to prevent and protect students, staff and others from discrimination, bullying, intimidation and harassment.”

The Idaho Commission of Human Rights, a state governing body, also weighed in on Friday night.

“Discrimination under these acts can occur when an employer or school allows a hostile environment to exist against persons because of their race, sex and national origin,” the commission said in a statement, according to the Idaho Press. “Simply because conduct takes place as a so-called joke does not excuse otherwise unlawful conduct.”

The school did not identify the staff members who wore the costumes.

About 13 percent of the students at the elementary school are Latino, according to data from Idaho Ed Trends.