Since national flags may be perceived by some as xenophobic, eighth grade pupils in Karlshamn have been ordered to wear less inflammatory garb for a photo to be published in the school yearbook.
"Anybody looking at the photo could view it as a political demonstration," principal Pär Blondell from Strandskolan told news agency TT.
The headmaster added that some of the pupils have labelled the ruling "ridiculous".
Following an article on the subject in newspaper Sydsvenkan, a number of parents and irate letter-writers contacted the principal to express their dismay at the shirt ban.
But Blondell stuck to his guns, arguing that the pupils risked inadvertently earning themselves a bad reputation. People could begin speculating about "the racists from Karlshamn" once the yearbook began being distributed in the Malmö area, he said.
Caroline Johannesson, one of the pupils affected by the ban, failed to understand the principal's reasoning.
"You should be able to wear what you want," she said.
Her father agrees and has pledged to attend the next parent teacher meeting wearing a national team shirt in protest.