Flames tore through three classrooms and an office at South New Brighton School, sending up plumes of black smoke that were visible from the central city.
The fire has now been extinguished.
Fire and Emergency said it had reached a second-level alarm and crews arrived at the scene about 7pm.
The primary school in Estuary Road has about 500 to 600 students.
Fire and Emergency warned people to stay away from the area and keep their windows closed if they were downwind from the blaze.
Steph Hickman has two children at the school and was watching the fire from police cordons set up around the school.
"When we came over Bridge St you could just see all the black smoke," she said.
"There's a lot of families have come down ... a lot of families live in the area."
A post on the school's Facebook page said staff had been helping the firefighters.
Fire and Emergency said crews would remain at the school for a few more hours to make sure the fire did not flare up again.
Police say a scene guard will remain in place while they investigate the cause of the fire.