The decision to U-turn on advice around face coverings in schools was influenced by the experience of pupils in Scotland, who are already back in the classroom, the prime minister has suggested.
Boris Johnson said he was following World Health Organization advice in his decision to change policy on the use of face coverings in English schools, but he also suggested what "they discovered in Scotland" was a contributing factor.
When the outbreak at Kingspark School in Dundee increased from six on Friday to at least 19 on Monday, Scotland's First Minister Nicola Sturgeon decided to enforce face coverings at secondary schools.
The WHO changed its advice over the weekend, saying everyone over the age of 12 should wear a face covering where social distancing is more difficult.
Scotland adopted the WHO's advice on Tuesday and went further by also asking children over five to wear them while travelling on dedicated school transport.
For days Mr Johnson resisted pressure to adopt the WHO advice, with his deputy chief medical officer, Jenny Harries, saying the evidence on whether children over 12 should wear masks in schools was “not strong”.
England's Education Secretary Gavin Williamson claimed several of the measures being adopted by schools to limit the spread of coronavirus meant masks were not required.
But with a week to go before millions of students resume their studies in England, a U-turn was made.
Explaining the policy shift, the PM said: "What you’ve got is the WHO saying face coverings should be used by over-12s.
“What we’re saying is if you’re in a school where there is a ‘hot spot’ then it probably does make sense in confined areas outside the classroom to use a face coverings in the corridor and elsewhere.
“As they discovered in Scotland, where they’ve had the kids in for at least a couple of weeks now, what they found was that it was raining outside, people were coming in and they were congregating in the corridors and the move to face coverings they thought was sensible."
He added that face coverings in classrooms was "clearly nonsensical – you can’t teach with face coverings, you can’t expect people to learn with face coverings".
In Wales, pupils over the age of 11 in will be recommended to wear face coverings in school communal areas where social distancing cannot be maintained, the Welsh government said.
The new guidance also covers pupils on school transport, college students, and staff and will require schools and local authorities to carry out risk assessments of their sites to determine if the two-metre rule cannot be maintained.
England's Education Secretary Williamson defended the latest U-turn, saying the public "would want to see a government that was willing to be able to change and adapt".
He explained why so many last minute switches in policy had been made during the coronavirus pandemic, saying "sometimes we have to adapt to the fact it is unprecedented times and we do have to change our course of action".
At the suggestion that the UK had been much slower to adapt than other countries, Mr Williamson said: "No, not at all, we've led the way in our fight against coronavirus".
While visiting Castle Rock school in Coalville, Leicestershire, where pupils have returned, Mr Johnson said students had “lost too much time” from their learning as a result of the pandemic and encouraged all youngsters to return to their classrooms when schools reopen for the autumn term.
He added: "School is safe, it is exciting, it is the place to learn, it is the place where people are going to be absorbing in the next few days and weeks, young people are going to be absorbing things they will never forget."
Advice from the WHO on face coverings says “children aged 12 and over should wear a mask under the same conditions as adults, in particular when they cannot guarantee at least a 1-metre distance from others and there is widespread transmission in the area."