Jeremy Corbyn said sufficient funding must be made available to help a fire-hit secondary school get back on its feet.
Mr Corbyn said he was shocked by the extent of the damage at Woodmill High School in Dunfermline, and by the speed at which the blaze took hold on Sunday night.
Speaking during a visit to the scene on Thursday, he said the consequences had been terrible for the school but that the incident had highlighted the importance of an integrated fire service.
“I have spoken to parents and there was so much praise for the fire service and for the school but obviously they’re very worried about the future of their children’s education,” he said.
“It’s also about keeping the school community together and that’s going to be the hard part.
“Obviously there has to be sufficient funding made available and I have been asking about that.
“There have been offers from other schools for some equipment but there are other things such as libraries and sports facilities.”
Mr Corbyn met David McGowan the Scottish Fire and Rescue Service’s deputy chief officer, who was the incident commander on the night of the blaze, as well as Woodmill rector Sandy McIntosh.
“The firefighters got here very quickly and they did a really good job,” he said.
“What it does show is the importance of an integrated fire service and we must reflect on the incredible efficiency and bravery of firefighters in dealing with this.”
A 14-year-old boy has appeared in court in connection with the blaze, the cause of which is still being investigated.