"We can't guarantee your safety if you leave here." This was the warning for pupils who had travelled to the junior summit from schools in Britain, Germany, Italy, France, Russia, Japan, and the United States on Monday.
But the 120 students who had gathered at Edinburgh university had no intention of heading into the city centre, where protesters were clashing with riot police.
The 14 to 16-year-olds had a job to do: thrash out a communique on climate change and Africa in time to hand over to Tony Blair on Wednesday morning at Gleneagles, before the G8 summit.
J8 (Junior 8) was launched in November 2004 by the Department for Education and Skills and investment bank Morgan Stanley.
Children from 50 UK schools entered the competition, submitting what their message would be to the world's leaders.
Charlotte Pearson, a Year 10 pupil from Calthorpe Park school, Hampshire, wants to spend her gap year in Rwanda. "What is good about this summit is that we are being listened to and not told we are just kids," she said.
On Monday, pupils heard talks from experts on climate change and Africa, including Myles Wickstead, head of the secretariat for the Africa Commission.
Shuena Mohamed, a Y10 student from Langdon school, in east London, said: "I went to Tanzania two years ago. Everyone disagrees with the government. Mr Wickstead would not see that because he would only see what the government wanted him to see."
Mr Wickstead said: "No doubt there are issues of governance and corruption in Tanzania, but it is a country where we have seen significant progress."
Pina Scalera, a teacher at the Liceo Galvani, in Bologna, Italy, said: "I think G8 leaders will look at the communique for the novelty and because of the audacity of it. It is a bit like Oliver Twist asking for more porridge.
Excuse me, Mr Chirac, this is what I think."
Vince Doherty, assistant head at Langdon, was in Edinburgh this week accompanying Alfie Sadler, 14, Matthew Hector, 15, Priyah Prabhanandah, 14, and former Langdon pupil Shetal Patel, 15.
On Saturday, the Y9 and Y10 students spoke at the Meadows in front of a 225,000-strong crowd.
Alfie said: "I was telling them how we needed to help the African people - that they deserved an education as much as we do. It was amazing. We'll be doing an assembly when we get back to school. Speaking in front of 300 people won't be as nerve-wracking."
The pupils took part in Unicef's C8 children's summit in Dunblane on Tuesday, and were due to appear at the Scottish Live8 concert at Murrayfield stadium on Wednesday.
A group of 26 pupils from Langdon school were also in Singapore this week for the Olympic bid. They were playing basketball with David Beckham on Tuesday morning.
Mr Doherty said: "Mr Blair's going to think Langdon school is stalking him."
On Tuesday, the pupils gave their communique to school standards minister Jacqui Smith and Jack McConnell, first minister at the Scottish parliament.
Patrick Farnon, 15, from St Colman's college, County Down, was due to be among those handing the document to Mr Blair on Wednesday morning.
"The G8 leaders will be stupid not to listen to us," he said.
"The students here know what they're talking about. Anything put forward will be valid. I am going to tell Tony Blair it is a good read when I hand it over."
international 19 THE COMMUNIQUE
1 We want an integrated climate economy. Governments should tax industries that produce CO2 and invest the money raised in environmentally-friendly schemes such as public transport.
2 Governments must promote a greater understanding of how personal actions affect the whole environment.
3 There must be an international symbol denoting products which are energy-efficient and environmentally friendly.
4 Renewable energy technology must be integrated into every new building.
5 The G8 leaders must focus on the basics in Africa first - primary education, the numbers of mothers dying, and HIVAids.
6 The G8 countries must fund programmes to train the trainers of teachers, doctors and administrators.
7 The G8 should support the African Union (the African equivalent of the EU) and the African Peer Review Mechanism ( a collective of African countries which aims to reduce corruption and improve governance).
8 The G8 must establish a fund which supports African businesses.
Full text at: www.tes.co.uk