Some had borrowed from girlfriends, others from sisters. A few had gone the extra mile and shaved their legs. When the Isca academy in Devon opened on Thursday morning, an estimated 30 boys arrived for lessons, heads held high, in fetching tartan-patterned skirts. The hottest June days since 1976 had led to a bare-legged revolution at the secondary school in Exeter.

As the temperature soared past 30C earlier this week, the teenage boys had asked their teachers if they could swap their long trousers for shorts. They were told no – shorts weren’t permitted under the school’s uniform policy.

When they protested that the girls were allowed bare legs, the school – no doubt joking – said the boys were free to wear skirts too if they chose. So on Wednesday, a handful braved the giggles and did so. The scale of the rebellion increased on Thurday, when at least 30 boys opted for the attire.

“Quite refreshing” was how one of the boys described the experience, pointing out that if even Royal Ascot had allowed racegoers in the royal enclosure to remove their jackets, then the school ought to relax its dress code. Another said he rather enjoyed the “nice breeze” his skirt had afforded him.

A third, tall boy said he was told his short skirt exposed too much hairy leg. Some of the boys visited a shop on their way to Isca – the name the Romans gave to Exeter – to pick up razors to make sure they did not fall foul of any beauty police.

Ironically, the temperature had dropped in Exeter to a more manageable 20C, but some boys said they had enjoyed the freedom afforded by the skirts and that they might continue.

The school said it was prepared to think again in the long term. The headteacher, Aimee Mitchell, said: “We recognise that the last few days have been exceptionally hot and we are doing our utmost to enable both students and staff to remain as comfortable as possible.

“Shorts are not currently part of our uniform for boys, and I would not want to make any changes without consulting both students and their families. However, with hotter weather becoming more normal, I would be happy to consider a change for the future.”

It was too late. The revolution was picked up by media organisations across the globe, and Devon county council was forced to help the school out with inquiries. A spokesperson said: “About 30 boys arrived at school this morning wearing school skirts. None of the boys have been penalised – no one was put in isolation or detention for wearing a skirt.”

The mother of one of the boys who began the protest said she was proud of him. Claire Lambeth, 43, said her son Ryan, 15, had come home earlier in the week complaining about the heat. “He said it was unbearable. I spoke to a teacher to ask about shorts and she said it was school policy [that they could not be worn]. I did say this was exceptional weather, but they were having none of it. If girls can wear skirts, why can’t boys wear shorts?

“Ryan came up with the idea of wearing a skirt, so that evening we borrowed one. He wore it the next day – as did five other boys. Then this morning … I didn’t expect it to take off like that. The school is being silly really – this is exceptional weather. I was very proud of Ryan. I think it was a great idea.”

Another mother said: “My 14-year-old son wanted to wear shorts. The headteacher told them: ‘Well, you can wear a skirt if you like’ – but I think she was being sarcastic. However, children tend to take you literally, and because she told them it was OK, there was nothing she could do as long as they were school skirts.”

A third mother said: “Children also don’t like injustice. The boys see the female teachers in sandals and nice cool skirts and tops while they are wearing long trousers and shoes and the older boys have to wear blazers. They just think it’s unfair that they can’t wear shorts in this heat.”

There were signs that the revolution might be spreading. The Guardian has heard of at least one more school in Wiltshire where one boy turned up in a skirt, although it did not go down quite so well with his friends.

And schoolboys were not the only ones making controversial dress choices because of the heat. Michael Wood, who works as a porter at Watford general hospital, claimed he was facing disciplinary action from his employers Medirest for rolling his trousers up to try to cool down. A spokesperson for the company declined to comment on the case, but said: “The health and safety of our colleagues is always our number one priority.”

What happened to summer school uniforms? Matthew Easter, managing director of the schoolwear supplier Trutex, said they had become less popular for reasons of economy. “It’s really up to the individual school to decide, but the headteacher is in a difficult position. A decade or so ago, summer wear was more popular, but there’s been a change recently to try to make uniforms as economical as possible. Summer uniforms are only worn for a matter of weeks.

“If parents haven’t bought uniform shorts, then some children may feel disadvantaged, so perhaps the decision in this case is simply down to fairness.”

It may be that the weather will solve the problem for the school. The Exeter-based Met Office – situated up the road from the school – predicts pleasant, but not searing, temperatures over the coming week.