He is a prime minister said by supporters to be relishing the campaign trail and enjoying the opportunity to meet the public.

But not, it seems, if the public in question are Nottinghamshire sixth form students.

Boris Johnson was accused of avoiding teenagers on Friday after hundreds of youngsters were reportedly confined to classrooms and a common room during his visit to their school.

The year 12 and 13 pupils were kept away from the Old Etonian as he and his entourage spent 40 minutes at George Spencer Academy in Stapleford.

As the Tory leader met teachers and specially selected younger pupils, the older teens – who may have been keen to discuss education cuts and tuition fees – said they were ordered not to leave rooms where they were held for the duration of the visit.

Top 10 marginal seats to watch at the general election Show all 10 1 /10 Top 10 marginal seats to watch at the general election Top 10 marginal seats to watch at the general election North East Fife Currently held by the SNP with a majority of 2 Getty Top 10 marginal seats to watch at the general election Kensington Currently held by Labour with a majority of 20 Getty Top 10 marginal seats to watch at the general election Perth and North Perthshire Currently held by the SNP with a majority of 21 Getty Top 10 marginal seats to watch at the general election Dudley North Currently held by independent, formerly Labour, MP Ian Austin with a majority of 22 LivingInMediocrity Top 10 marginal seats to watch at the general election Newcastle-under-Lyme Currently held by Labour with a majority of 30 Derek Harper Top 10 marginal seats to watch at the general election Southampton Itchen Currently held by the Conservatives with a majority of 31 Rob Candish Top 10 marginal seats to watch at the general election Richmond Park Currently held by the Conservatives with a majority of 45 Robin Webster Top 10 marginal seats to watch at the general election Crewe and Nantwich Currently held by Labour with a majority of 48 Jaggery Top 10 marginal seats to watch at the general election Glasgow South West Currently held by the SNP with a majority of 60 Alec MacKinnon Top 10 marginal seats to watch at the general election Glasgow East Currently held by the SNP with a majority of 75 Christine Johnstone

“We were told it was for security reasons,” 17-year-old Robbie Szymanski told The Independent.

“But it’s a pretty cowardly thing to do if you ask me. You’re at our school, Boris: come and see what we think of you.”

Lessons were held up because the youngsters were not allowed to move round the site. Some students, who should have had free periods, reported not being allowed to leave the building or go home.

“Everyone was pretty disgusted,” said Robbie, a history, sociology and economics student. “The ironic thing is most people aren’t even bothered about him. I think the majority of sixth formers would have probably not even gone to see him if they had the chance.”

There were suggestions other pupils may also have been affected. “My son is in year 10,” wrote one parent, Shelley Draper, on Twitter. “Very disappointed with how the school has treated him during this visit… Pretty fuming.”

The school said that a bridge linking the sixth form site to the main school had been closed at the request of Mr Johnson's team.

Spokeswoman Kate Godfrey said: "Due to late running of the visit, the break bell was delayed and an extended lunch given. This meant that some students may have been asked to wait a few minutes before beginning next lesson."

She added non-selected students would have been allowed to approach Mr Johnson and added: "We are proud of our politically engaged and articulate students nd of the opportunities that we create for them to challenge politicians including, last week, Anna Soubry [the local MP]."