More than 200 children have been evacuated from a Fife school after a large fire broke out.
Emergency services were called to Cairneyhill Primary School near Dunfermline, Fife, at around 1pm on Friday.
Staff and 220 pupils were removed and taken to a nearby church while firefighters tackled the blaze.
Local residents were warned to stay indoors and close all windows, with large amounts of smoke billowing from the burning building.
Chief Inspector Irene Ralston said: “We are asking the public to avoid the area where possible as emergency services deal with this incident.
“Fortunately all staff and pupils were evacuated safely and we continue to support our partners as the fire is extinguished.
“Further updates will be issued on Fife Division’s Facebook and Twitter page as the incident progresses.”
More than 30 firefighters and seven appliances were at the scene, using breathing apparatus and high-powered hoses.
Despite their efforts, the blaze gutted the school building.
All staff and children were described as safe and well.
The access road to the school, Northbank Road, has been closed and officers urged members of the public to avoid the area unless urgent to allow emergency services easier access.
A Fife Council spokeswoman said: “The school was evacuated safely. Children and all the staff were evacuated to a local church hall.
“Parents were notified to come and collect the children.”
Police Scotland said the blaze has been contained and members of the public are no longer asked to stay indoors and keep windows closed.
Firefighters remain at the scene to check for any hidden fire spread.
Group manager Richie Hall, the incident commander, said: “It was a challenging environment but they did a tremendous job through difficult conditions to find that source, contain the fire - and then fight it.
“Their efforts meant that the fire, located in the centre of the building, was prevented from spreading any further.
“They are now searching for any further pockets of fire to ensure the building is made absolutely safe.”
Mr Hall commended firefighters for their efforts in bringing the incident to a “swift and safe” conclusion.
He added: “I must also pay credit to both the children and the school staff who evacuated quickly and calmly, and made their way to a place of safety.”