Police have arrested a 14-year-old boy in connection with a fire at a Dunfermline high school.
More than 80 firefighters worked through the night at Woodmill High School after the alarm was raised at about 17:05 BST on Sunday.
No-one was hurt but pupils have been told to stay at home as Fife Council prepares a plan for the school's 1,400 children.
The teenager is due to appear at Dunfermline Sheriff Court on Tuesday.
Police thanked members of the public who came forward with information in relation to the incident.
'Most vulnerable pupils'
Fay Sinclair, convener of Fife Council's education and children's services committee, said planning for the 1,400 displaced pupils had begun.
She said: "The council's teams have been meeting to see what we can put in place for the young people in the short, medium and longer term.
"The head teacher met with the staff this morning to start looking at things like e-learning and how we can get some support to the children at home this week. The school will be closed for the remainder of the week."
She said the council had not yet been able to access the building.
"It is too early to say when, or if, pupils might get back into the building and what we are looking at is contingency plans and where else we might be able to accommodate the pupils.
"In particular, the area of the building where the fire broke out was the DAS, the department for additional support needs, so these are some of our most vulnerable pupils who will need a lot of support and specific equipment. That's some of the most urgent work that is going on to source that equipment so that we can get these pupils back to some sense of normality as soon as possible."
Ms Sinclair added that the growth of the town meant that most of the schools in Dunfermline had reached capacity.
She said: "All of the our high schools are very full so there is not an obvious immediate solution or a neighbouring school that could accommodate that many, so there are a number of other options being explored. The planning is under way. It will be communicated to parents and pupils as early as possible."
The school's head teacher Sandy McIntosh tweeted that staff were "devastated" by what had happened.
We are all utterly devastated by what has happened to our school. I will be meeting with our teachers and school staff this morning, along with staff from the Education Service and wider Fife Council to put in place plans for our young people. Mr McIntosh— Woodmill High School (@WoodmillHigh) August 26, 2019
The Scottish Fire and Rescue Service asked people to avoid the area to allow access by the emergency services.
Crews remained on the scene on Monday morning as the damage to the building was revealed in the daylight.
Roddie Keith, Fife area manager for the Scottish Fire and Rescue Service (SFRS), said: "We are working very closely with our colleagues in Police Scotland and our investigation is at a very early stage.
"We are still going to be on the site for some time. At the height of the fire last night we had more than 80 firefighters here. We still have approximately 50 firefighters and 10 appliances here."
He said that the size of the school caused significant issues.
He added: "It was technically difficult for our crews to deal with. It is a large school, over many levels. It has a number of different buildings which were constructed during different periods.
"Our key focus was trying to contain the fire as far as possible within the annex building and preventing fire spread to the remainder of the school which we were largely successful in doing."
Deputy First Minister John Swinney tweeted his support: "Terribly sorry with the news @WoodmillHigh. @scotgov has been in contact with @FifeCouncil and will discuss next steps. Good wishes to all in the school community at this tough time."