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 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.
Fay Sinclair, convener of Fife Council’s education and children’s services committee, said the fire had spread from the additional support needs department to the main building.
She told the BBC’s Good Morning Scotland programme: “The council’s emergency teams will be meeting this morning to look at what are the options here. We’re talking about 1,400 pupils displaced from the school, at least for the short term.”
Ms Sinclair said it would be difficult to transfer pupils to other nearby schools as many were already at full capacity.
“Dunfermline has been a rapidly growing town over recent years. All of the schools are very full, so there’s not an immediate place to move these pupils to,” she said.
“The teams will be meeting today, the head teacher will be meeting all the staff today to look at how we can get these pupils accommodated as quickly as possible.”
The school’s head teacher Sandy McIntosh tweeted that staff were “devastated” by what had happened.
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.”