Dozens of students at Fredericton High School walked out of class Friday afternoon to protest a dress code they believe is discriminatory.

The action is the latest in a growing battle that has the Fredericton Youth Feminists group calling for dress codes to be scrapped and a comprehensive sexual assault policy put in their place.

About 50 students, including some boys who attended in solidarity, left class to hold a protest outside.

"It's not them that's being distracting. It's the person that's being distracted that is allowing themselves to be distracted,” said student Mitchell Buggie.

“We hope it sends the message that we're not going to stop, we're not going to stay quiet until we get our demands, until we get safety, until we get respect,” said Sorcha Beirne of the Fredericton Youth Feminists.

The group is calling for an end to dress codes throughout the Anglophone School District West, saying they sexualize girls and are enforced more for them than for boys.

"I've personally been asked to leave class for what I was wearing before and I don't think that's fair or appropriate because it teaches the students that what they're wearing is more important than their education,” said alum Emma Howell.

While the group rallied outside the school, administrators watched from within.

David McTimoney, the school district’s superintendent, said it’s important for students to be heard.

"What's also important is for students to be heard in the appropriate way, and in my mind walking out of class on a Friday afternoon isn't the appropriate way,” McTimoney said.

The Fredericton Youth Feminists say the way in which the dress codes are enforced contributes to the perpetuation of rape culture.

“By having a dress code and not a sexual assault policy we are placing the blame and the responsibility on the victims and that is wrong,” Beirne told the crowd.

After walking out, the students attempted to take their protest inside, only to find the doors had been locked.

With files from CTV Atlantic’s Andy Campbell