(CNN) A social studies teacher in Long Island, New York, told her students to write funny captions for images of freed slaves, sparking outrage among parents on social media.

The teacher, who has been removed from teaching while the school district investigates, has since apologized for her "insensitive words and actions."

The teacher at J.W. Dodd Middle School instructed three eighth-grade classes to write captions for the images of Reconstruction-era sharecroppers, telling students to "make it funny," and "don't bore me," according to a statement from Freeport Public Schools Superintendent Kishore Kuncham.

Social media posts from relatives of the students including photos of the assignment, went viral sparking outrage on the internet.

The teacher, whose identity has not been released by the school district, called her own words and actions "insensitive " in a statement released by Freeport Public Schools.

"As a teacher and fellow member of this school community, it is my responsibility to exercise the highest degree of care and thought in all of my student and staff interactions. I failed to do so last week, and I fully accept that I must work hard to rebuild trust from my students, colleagues and the community," the statement says.

'Poor judgment'

Freeport residents expressed mixed reactions, but many were outraged. "What would make you even say something like that in the first place its just unthinkable," one told CNN affiliate WCBS in an interview.

A parent whose daughter is a student in the class, however, chalked it up to "poor judgment."

"She's a good teacher, she didn't mean it that way. Some people took offense to it and I know how she meant it," the student told WCBS.

The investigation started last Friday after several parents contacted the school with concerns. The school district is finalizing an agreement with the teacher and her union representatives, Kuncham said in the statement.

"Let me be perfectly clear: Our investigation has determined that this lesson was poorly conceived and executed," Kuncham's statement says. "Aside from the fact that this is a poor lesson, it is an insensitive trivialization of a deeply painful era for African Americans in this country, and it is unacceptable."