A school will reopen today after scores of firefighters battled to save the building from an overnight blaze.
The fire broke out inside a ground floor toilet block and classroom inside Meldrum Primary School at about 3am and six fire engines were sent to the scene.
At its height, there were 45 firefighters battling to get it under control to prevent it from destroying the building.
The crews used breathing apparatus and jets and managed to put the flames out by 4.45am.
Police and the ambulance service also attended to assist the crews but were not needed.
Yesterday pupils and staff were told to stay at home by Aberdeenshire Council while the building was assessed and fire investigators examined the debris.
David Farries, deputy assistant chief officer and head of service delivery for the north of Scotland, thanked crews in a post on social media for preventing any further damage to the building.
He said: “Well done to all the crews who attended for limiting the damage, this had the potential to be devastating for the Oldmeldrum community and Aberdeenshire.”
While the authority’s chief executive Jim Savege also thanked the crews for their “excellent work in containing the damage to our Aberdeenshire school.”
Last night the authority confirmed on Facebook that the building would be open as normal.
A spokesman said: “We would like to thank parents, teachers, staff and children for their patience. We are also grateful to Scottish Fire and Rescue Service and our partners for their prompt response.”