A group of Commack High School seniors could face disciplinary or legal action after they posed for photos wearing T-shirts that spelled out the word "rape" following the senior class photo shoot on Thursday.

In one photo, five male students can be seen wearing black T-shirts that spell out "R-A-P-E-?" In the other, a sixth male student can be seen on the ground with his hands apparently bound. In the second photo, the "?" on the shirt of one of the students is blacked out. The photos, which spread on Twitter, quickly sparked outrage.

"I don't even want to enter the doors of Commack High School tomorrow or ever where there are people who find rape as a joke," a female Commack High student wrote on Twitter. "So unbelievably embarrassed and disgraced to be an alumnus of Commack High School," another person wrote on the social media site.

Commack school officials said the offensive photos were taken soon after students had been dismissed for the day on Thursday. All seniors had assembled on the bleachers of the varsity field during last period for the annual senior photo, according to a statement on the district's website. A restriction on "lettering and/or messages" on clothing during the senior photo shoot was actively enforced, the statement says. "There is no doubt that these students showed an inexcusable lack of judgment, and their actions are taken very seriously by the entire school community," school officials said.

School officials said the stunt appeared to be an "isolated incident" and "upon completion of our investigation, we will take the necessary and appropriate actions including, but not limited to, disciplinary and legal action if applicable."

A friend of the students in the photos told NBC 4 New York that the boys "feel terrible" about the incident and had apologized to everyone they hurt.