The Knockando Wool Mill has been working for 200 years
A woollen mill on Speyside which has manufactured cloth since 1784 has been given a lifeline through lottery cash.
Knockando Woolmill, which featured in the BBC Two series Restoration, is in danger of collapse and school trips can no longer visit because of the risk.
The mill has been given a grant of £1.3m and development funding of £120,000 by the Heritage Lottery Fund.
The original machinery, acquired over the course of centuries, is also in need of repair.
The present weaver, Hugh Jones, has managed to single-handedly sustain the traditions of the UK's oldest surviving district woollen mill but he is keen to pass on his knowledge and skills to future generations.
He said: "I would like to emphasise the great amount of work done by the Woolmill trustees and advisors over the last few years.
"This HLF award is the most important milestone yet and has been achieved through immense application and attention to detail. This may be the voluntary sector but it requires a thoroughly professional approach.
"I am obviously biased through long association but I know that Knockando Woolmill is a very important survivor of Scotland's long textile history and future generations will be grateful for the current efforts being made to ensure its survival."
Chairwoman of the Knockando Woolmill Trust, Jana Hutt, said: "Our philosophy is to restore the site by doing as much as is necessary but changing as little as possible.
"We want to keep the unique feel of the place, the sights, sounds and smells of a small, working woollen mill.
Hugh Jones has run the mill single-handedly
"We want to share the thrill of seeing cloth grow as it is being made in the loom and know that a piece of history has been produced."
The site, which is currently inaccessible to the public, consists of the woolmill, the woolmill house, the cottage, the old shop and the byre, which will be converted into a visitor centre with a cafe and education room.
Features such as the water wheel will be reinstated and a new training workshop will be built to restore the machinery and provide training in traditional skills.
In addition to the physical conservation, the Heritage Lottery grant will be used to fund an education officer for five years.
Colin McLean, the Heritage Lottery Fund's manager for Scotland said: "This is a magical place, an astonishing fragment of our rural history which has survived because of one man.
"Through this Heritage Lottery Fund-supported project, today's and tomorrow's children will be able to touch Scotland's history, working looms which have been worn by the hands of their ancestors over hundreds of years, learning skills which are in danger of being lost forever."
Local MSP Richard Lochhead said: "I am absolutely delighted that Knockando Woolmill has secured this major funding boost.
"The Woolmill project has the potential to be one of Moray's biggest tourist attractions and will preserve a vital part of the region's heritage".
Moray Council convener Councillor George McIntyre said the award would help preserve one of Moray's most import industrial buildings for future generations and provide the area with a major tourism asset.