Crews used 10 breathing apparatus, two hose reels, two jets, two compressed air foam jets and the aerial ladder platform to bring the fire at Winton School in Andover under control.
Group Manager Dan Tasker said: "The first crews to arrive were met with a challenging situation of a confirmed fire plus the evacuation of 500 pupils."
More top news
Holly has the latest weather forecast for the west of the region.
Holly has the latest weather forecast for the east of the region.
The sister of Sean Benton who was found shot dead at an army barracks 23 years ago, says she is determined to find out exactly how he died.