A Pennsylvania high school has said it will discipline students who walked out of class to protest gun violence in the wake of the school shooting in Parkland, Florida last month.

Pennridge High School said it would give a day of detention to the more than 200 students who walked out of class as part of the nationwide protest on Wednesday, according to local news outlets.

The walkout was organised after the shooting at Marjory Stoneman Douglas High School, where a lone gunman shot and killed 17 students and staff members on Valentines Day. Tens of thousands of students participated in the nationwide walkout on the one-month anniversary of the shooting – including approximately 225 students from Pennridge.

The school organised an assembly for the same day, where students were to sit in silence for 17 minutes and watch a slide show honouring the victims. Approximately 800 students attended that assembly, according to Pennridge school district superintendent Jacqueline Rattigan.

“We are proud of the way our students conducted themselves during today’s silent Remembrance Assembly,” Ms Rattigan said in a statement. “...It was a moving experience for those who participated.”

Florida shooting – in pictures Show all 10 1 /10 Florida shooting – in pictures Florida shooting – in pictures Police arrest a suspect in connection with the shooting at the Marjory Stoneman Douglas High School in Parkland, Florida Reuters Florida shooting – in pictures Parents wait for news after reports of a shooting at Marjory Stoneman Douglas High School in Parkland, Florida AP Florida shooting – in pictures Anxious family members wait for news of students AP Photo/Wilfredo Lee Florida shooting – in pictures Students being evacuated from the school AP Florida shooting – in pictures Students being evacuated from the school Getty Florida shooting – in pictures People gather waiting for word from students AP Florida shooting – in pictures Parents waiting for news on their children AP Florida shooting – in pictures People gather at a hotel where students were taken after the shooting Getty Florida shooting – in pictures Florida Governor Rick Scott speaks to the media as he visits Marjory Stoneman Douglas High School following the shooting AFP/Getty Florida shooting – in pictures Dr. Igor Nichiporenko, Medical Director Trauma, left, and Dr. Evan Boyer, Medical Director, Emergency Services, speak about treating victims and the suspect at a press conference outside Broward Health North hospital AP

The superintendent added that students who walked out of the school during the assembly would face consequences, which she said were “outlined in advance”.

District public relations coordinator Joe Ferry told the Allentown Morning Call that the consequences would be one Saturday detention for a first offence and two for a second offence. Five students who went to Dunkin’ Donuts during the walkout will face an additional detention.

Parkland shooting: Brooklyn students in school walkout explain why they're taking part

The protest grew out of the student uprising after the Parkland shooting, when students from the Florida high school and others began lobbying their lawmakers to strengthen gun control laws. Parkland students have met with Florida state lawmakers, participated in a town hall with US senators, and attended a listening session with President Donald Trump. They have also helped organise another walkout in April, and a “March for Our Lives” later this month.

Some schools gave students a free pass to leave the building for the protest on Wednesday. Others, like Pennridge, were not as lenient.