For generations, they were a familiar sight on the Scottish landscape, their huge sails spinning in the wind producing the power to drive the heavy millstone below.

Commonplace across the country from the mid-15th century, eventually the wind power that gave windmills their name would be replaced by steam and, eventually, gas.

Before long, the towering, elegant structures became obsolete, tumbling into disuse and either dismantled so their stones could be used elsewhere or left to simply crumble away.

Now efforts to restore one of Scotland’s few remaining windmills and the most complete one left in the country, are growing – driven forward by a remarkably determined community effort that has spanned almost half a century.

After nearly 50 years of battling to secure the future of Carluke’s landmark High Mill, built more than 220 years ago and perhaps the ‘greenest’ form of energy around, locals are now within touching distance of seeing restoration work begin.

Powering them forward – in a perfect example of ‘laying the groundwork’ – has been a small but eager and green-fingered community who, determined that the dilapidated mill shouldn’t be forgotten, have turned the derelict area around it into a thriving cottage garden.

For 20 years one of Scotland’s ‘stuck sites’ – eyesore areas that are trapped by issues such as ownership and apparently without any use – it has now burst into life, bringing new hope that the Category A listed building will soon follow.

According to Bill Anderson, of Carluke Development Trust, the community garden, with its corn crop – a nod to the mill’s historic past - potato and tomato patches, colourful flower beds, sprouting fungi and newly laid winding paths, has been a vital component in the £3.2 million bid to breathe new life into the mill.

Before much longer, work at the 1.2 acres site will shift from cultivating crops, to rebuilding the crumbled tower, turning back into a working mill complete with original millstone and once again powered by nature.

“This garden has become the hook that brings in new people who didn’t know about the mill but who want to come and do some gardening and work on the ground,” he says.

“It’s been a long journey to restore the mill – for some, it’s been a 40- and 50-year long journey.

“The most important thing has been to keep the mill buildings in the minds of the community and the garden lets them see things happening on the site; it might not be work on the buildings, but they can see something is happening.”

The town’s High Mill, named after the hill on which it sits in the centre of Carluke, was built in 1801, one of two mills taking oat and barley from nearby farms and grinding it into meal. The other, Low Mill, relied on water power.

By the time of its construction, however, it was already almost out of date, with new forms of technology driven by the Industrial Revolution set to overtake wind power in favour of steam.

Within a few decades, High Mill had been converted to make use of the new source of energy, with a kiln and engine room added to provide steam power, and the once elegant sails stripped.

Not everyone was in favour of progress, and across Scotland debate flowed among certain groups who questioned the need to shift from wind power. Nevertheless, windmills across the country were either closed in favour of new, large milling factories or adapted to make use of new technologies.

High Mill continued to be used until the 1930s, but its closure saw it slowly fall into disrepair.

It was placed on Scotland’s Buildings at Risk Register in 2008, but by 2014, with water seeping through the roof and windows and despite various plans for its restoration having failed, it suffered a major collapse.

Now hopes are growing that work to revive the 221-year-old mill and turn the site into a visitor attraction, can begin within the coming year.

Plans include repairing the mill’s original machinery, including its 150-year-old millstone mill, returning it to the site and creating a working mill powered by wind and solar energy.

Carluke Development Trust, the group behind plans to restore the mill, took over the property from its owner in 2017 after securing a £278,000 Scottish Land Fund award.

A further £112,000 from the Fund last summer secured a two storey house next to the mill, completing community ownership of the whole site.

While recent support from the Vacant and Derelict Land Fund enabled the development of the community garden, paving the way for new funding applications from sources including the National Heritage Lottery Fund.

With the go-ahead already given to begin alterations and renovations to the mill and former stable building, as well as construction on community spaces, work is set to begin within months.

A major factor will be the replacement of the ‘cap’, the element of the windmill which once turned its magnificent sails.

“We don’t know what the sails would have looked like, whether there were six or eight,” adds Bill. “And because the kiln building was added to the tower, we can’t attach new sails as they wouldn’t have room to turn.

“Instead we will be the cap on the top of the tower with a fantail, so the mill will still be driven by the wind.

The hope is that the mill will soon be operational again – offering visitors a glimpse into a long lost way of life when communities relied on local mills to grind barley, grain and corn.

“It started as a green energy project and 200 years later we are returning it to green power,” he added.