Halloween is banned at a Brooklyn high school – and Hitler’s to blame.

A year after Walter Petryk, 17, came to school in a fuhrer-style mustache and Nazi uniform, Leon M. Goldstein HS for the Sciences sent home a letter on Thursday banning Halloween costumes – and Petryk is peeved.

Petryk – a senior who has already rounded up a group of about 20 students to protest the ban by dressing up anyway – is mulling masquerading as Jesus or a Hasidic Jew this year.

“This whole ban is ridiculous and they can’t enforce it,” said Petryk, of Park Slope. “Obviously, it’s because of me.

“I’m trying to tell as many students as possible that they can’t do anything to us.”

The Department of Education disagrees – and says school Principal Joseph Zaza is within his rights to ban costumes on the premises that they are “disruptive to the educational process.”

The DOE doesn’t have an umbrella policy on costumes.

Schools, however, can require students to remove clothing that “interferes with the learning process,” and if students refuse, they can be suspended for up to 10 days.

But Petryk isn’t worried in the slightest – in fact, he’s looking to fan the flames.

“We’re going to dress up the day before or the day after, just to annoy them,” he said.

While students at the school told The Post they’re split on Petryk’s behavior, they’re universally up in arms over the Halloween ban.

“I don’t care what the guy wears,” said sophomore Brian St. Jean, 15. “I just wanted to wear my ‘Scream’ mask at school this Halloween. Now I can’t.”

“I’m really upset that I can’t dress up,” added Karina Litvinova, 15, a sophomore. “That one guy ruined it for all of us.”

Additional reporting by Angela Montefinise

scahalan@nypost.com