Pupils returning from a French school trip to Paris found two young stowaways had made an 11 hour journey in the engine compartment of their coach.
The boys from Sudan emerged from their hiding place when the vehicle, hired by The Cowplain School, returned to Waterlooville, Hampshire on 28 May.
Headteacher Ian Gates said they were “dazed and dehydrated” and Year 9 and 10 pupils gave them food and drinks.
Hampshire Constabulary has referred the boys to social services.
Mr Gates said: “These were desperate people who needed help.
“The journey back was about 11 hours, so the two of them were very dazed and dehydrated, having spent a long time next to the coach’s engine.
“The children wanted to make sure they were fine and gave them food and water before police arrived.”
Police would not reveal the ages of the boys but said both were under the age of 18.