A fire broke out at Freeston Academy in Normanton just as pupils were arriving to collect their GCSE results.
West Yorkshire Fire and Rescue Service said around half of the Favell Avenue school was ablaze and the school’s ICT suite has been left gutted.
More than 50 firefighters from across the county were called to the scene after the blaze broke out at around 9.10am on Thursday.
Lucy Carter, of Hanson Avenue, next to the school, said: “I came back home at about 9.30am and I could just see the thick black smoke.
“Then I could just see flames flying into the air and the smoke was really thick and black.
“It was a bit surreal when I was watching it because I went there myself eight years ago.
“Not long after I got home I could hear all of the sirens and more fire engines kept arriving by the second.”
Firefighters were called to the scene just minutes before year-11 students were due to collect the GCSE exam results at 10am.
And as fire crews fought the blaze pupils were allowed to collect their results from the school’s sports hall.
Friends Ellie Middleton, Rachel Carter, Thomas Osborne all got the grades they needed to study at Pontefract NEW College next month.
Thomas, 16, who got three Bs and four Cs in his GCSEs, said: “I got up this morning and I could see all of the smoke and I thought it was the school.
“We’ve worked hard for five years - this could only happen on our results day. It’s unbelievable.”
Ian Bitcon, area manager for safety at West Yorkshire Fire and Rescue Service, said originally two fire engines attended the scene but immediately asked for support.
He said: “When the original appliances got here we had a quickly developing fire.
“Fires in the roof are always very difficult to deal with. Teams have worked really hard to deal with the incident.
“It has been a big incident with a large emergency services presence and we have had to do a small number of evacuations of properties in the area.
“It is too early to say what has caused the fire.”
A statement released by the school said: “Our main priority was the safety of our staff, students and contractors working on site, and to ensure that our year-11 students were able to collect their GCSE results.
“All staff on the site were accounted for and no one was hurt in the fire. The Freeston Academy would like to thank all local residents and the community for their support during this time.
“Parents and students will be advised of return dates and further implications in due course.”
A spokesman for the fire service said an investigation had been launched into the cause of the fire but said “it is not believed to be suspicious.”