Campaigners in the Cairngorms have bought the former Tomintoul Secondary School to launch a housing project aimed at helping to safeguard the community.
Classrooms in the village were closed 20 years ago following a steady decline in pupil numbers.
Parts of the complex have since been used occasionally by the neighbouring primary school but the site has been left largely empty for the last two decades.
What were the playing fields at the school gates now resemble an overgrown field near the centre of the picturesque Moray village.
A private developer had launched plans to knock down the former classrooms, gym hall and dining room to clear the site for housing.
However, it is understood those plans failed to attract enough interest to be viable.
Now the Tomintoul and Glenlivet Development Trust has concluded a deal to purchase the site to launch their own community housing project.
A lack of affordable housing in the village and surrounding area has been identified by the group as a barrier to encouraging families to stay in the community.
Trust chairman Doug Nisbet said: “This is an exciting and ambitious project that will deliver multiple benefits for our communities over a sustained period.
“The purchase of the site is a significant step towards our vision for vibrant and sustainable communities and builds on the trust’s existing developments.”
Plans for the site include 12 affordable homes with a mix detached and semi-detached designs.
Some of the proposed housing on the former Tomintoul Secondary School site also include a workspace within the property to provide room for potential businesses to grow.
The trust intends to sell four of the homes while offering eight for rent with the proceeds helping to sustain its other initiatives.
It is hoped demolition work will begin early next year with construction beginning in the spring.
The trust received a £183,000 grant from the Scottish Land Fund to help complete the purchase, with Highlands and Islands Enterprise supporting the demolition bill.
Fiona Robb, HIE’s head of strengthening communities in Moray, said: “We’re pleased to help enable works to get underway to support the provision of three affordable live-work homes.
“Population retention and growth across the region is at the heart of our mission.
“We recognise that the availability, affordability and energy efficiency of accommodation has been a major constrain to growth in the Highlands and islands.”
The trust has previously spearheaded a £500,000 project to overhaul Tomintoul’s museum, which the group took over from the council after it withdrew financial support.
Meanwhile, the group took over the management of the village’s Smugglers Hostel in 2013, which was due to close under the previous operators.
Efforts have also been made to develop an events programme to make the community appeal to residents and visitors of all ages.
Support from the Cairngorms National Park Authority helped the housing vision for the former Tomintoul Secondary School site, alongside other funders.
Ronnie MacRae, chief executive of Community Housing Scotland, said: “We are delighted to be supporting the trust and would like to congratulate them on their ambitious and well thought out project, utilising a brown field derelict site in the centre of Tomintoul.
“The project will provide an attractive development of high quality, mixed tenure affordable housing that will undoubtedly have long term positive impacts on the economy and social sustainability of the area.”