Funding to replace a Fife secondary school gutted by a huge blaze has been announced by the education secretary.

John Swinney confirmed the Scottish Government would provide some of the money to relocate Woodmill High School in Dunfermline to a new site after it was destroyed by fire on August 25.

A teenage boy has been charged over the blaze. He was released on bail pending further enquiries.

A joint campus, costing up to £180m, has been proposed to replace the school and also house St Columba's High School and Fife College.

The Scottish Government has pledged to provide a maximum of £90m in capital funding for the college section of the site and up to half of the cost of the school part.

Even before the fire in August, the Scottish Government was in discussions to replace the two schools and college with a joint site.

Now Mr Swinney has revealed the plans have been "accelerated".

The cost of the new school and college is estimated to be between £150m and £180m, and is expected to be completed by 2024.

Mr Swinney met Woodmill High headteacher Sandy McIntosh, pupils being accommodated at Fife College and representatives of Fife College and Fife Council on Wednesday morning.

Following the meeting, Mr Swinney said: "Woodmill High School was devastated by the fire and it is clear that Fife Council, Fife College and surrounding schools have made a tremendous effort to find alternative accommodation and minimise disruption to pupils' learning.

"Since the fire ten days ago, I accelerated discussions with Fife Council and Fife College and I am now very pleased to confirm we support the development of a brand new joint learning campus.

"Locating the two schools and Fife College on the same site would give pupils easy access to a greater variety of subjects and qualifications.

"Schools, colleges and universities are the cornerstones of our communities and a joint campus model will give Dunfermline a hub of high quality, low carbon and digitally-enabled facilities."

Fay Sinclair, Fife Council's education and children's services committee convener, added: "This is a really exciting opportunity.

"We have been looking at ways to expand, replace and improve our school buildings for some time and a shared campus will open up so many different learning options and routes for our young people to access the careers they want.

"Today's announcement gives the Woodmill community reassurance about the long-term plans for their school, as we work through short and medium-term arrangements at this difficult time."