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
Vehicle emissions in South Oxfordshire could be damaging to the health of residents in three of its towns.
Gatwick Airport has been named as one of the fastest growing airports in Europe.
Sussex Police are warning people to check carefully before booking tickets for The Eastwood Festival.