For more than 170 years it has stood tall and bright, unbroken by the ferocious storms and providing a welcome beacon for those in peril on the seas.

Perched at the most westerly point of the mainland, with just the isle of Barra and 2000 miles of Pacific Ocean separating it from Newfoundland, Ardnamurchan Lighthouse has served sailors, hosted royalty – and television’s Top Gear - and is about to play a lead role in a new Tartan Noir thriller.

But for the local community, the gleaming lighthouse at the end of a long and winding road, with its fascinating history and stream of dedicated keepers, is much more.

“For the community in west Ardnamurchan, that lighthouse has been a fairly important part of our lives going back generations,” says Davie Ferguson, who remembers going to school with the lighthouse keepers’ children in the years long before the light became automated.

“For most people it’s the lighthouse at the end of a long single track road, at the end of a peninsula.

“For us, it’s been here all our days.”

Now more than three decades since the last lighthouse keepers and their families left and locals found themselves barred by the new owner, Ardnamurchan Lighthouse is set to once again play a major part in the lives of the community living on its doorstep.

The past few months have seen a flurry of activity: new paths have been laid down, the car park has been improved, there are electric vehicle charge points, improved signs and a new viewpoint.

Work is underway to ensure the fabric of the A Listed keepers’ cottages is secure. The foghorn is being given some TLC, while preparations are underway to revamp the lighthouse museum for next season’s visitors.

Better still, the lighthouse buildings, where generations of locals in the past whiled away long, dark nights at ceilidhs, or gathered during the day with friends to watch the orca, minke whales and dolphins in the sea below, is slowly returning to the bustling community hub it once was.

The lighthouse ancillary buildings – the keepers’ homes, workshops and gardens - built in 1849 as part of the construction of the 118ft pink granite tower – are now under ownership of the local community, the new breed of lighthouse keepers.

“It’s an exciting time for the community,” says Davie, manager of the Ardnamurchan Lighthouse Trust.

“Now the community is in control we want to make it more useful so it’s more than just a tourist attraction.”

Built using granite quarried on the Isle of Mull and brought by boat to the peninsula, the lighthouse and buildings were designed by Alan Stevenson, a member of the engineering family led by his father Robert who oversaw the construction of many lighthouses, including the famous bell Rock Lighthouse.

Uncle to the writer Robert Louis Stevenson, Alan Stevenson designed Ardnamurchan in a particularly ‘Egyptian’ style, with a number of decorative details, such as figurines decorating the lamp base.

The lighthouse tower with its automated light and 152 stairs – climbed in 1986 by The Queen accompanied by the Duke and Duchess of York, and in 2013 by the Princess Royal – remains under control of the Northern Lighthouse Board.

A source of fascination for tourists and lighthouse enthusiasts, it recently featured in an episode of Top Gear as the presenters raced across the country on the pretext of delivering a new bulb. Next month it will play a major role in a new DCI Logan thriller by crime writer, J.D. Kirk, called Come Hell or High Water.

But for locals, the hope for the lighthouse is much simpler: that it can once again become a place for them to gather, in a return to how life used to be.

Mr Davie recalled: “It was a great place, we held ceilidhs here, and because it was a family station, lighthouse keepers lived here with their wives and children, so we got to know them well.

“The lighthouse keepers were interesting people who came from all around, places like the Isle of Man, Western Isles, Shetland.

“They were very handy guys. And because their main duties were through the night, during the day they would be helping with catching sheep and other things.

“They were very well supplied by the Northern Lighthouse Board, they had a good workshop with plenty of diesel and paraffin so there was always a bit of unofficial bartering that went on.

“They injected something special to the community, and it was a huge concern when they left.”

The lighthouse ancillary buildings and surrounding land were snapped up by the then owner of Skibo Castle, entrepreneur Peter de Savaray and a ‘no access’ sign placed across the causeway leading to the lighthouse.

“The community was upset, we lost the keepers and then lost access to a place that we had always had,” he added.

When the new owner’s rumoured plans did not take off, Highland Council bought the site. For more than 20 years the community trust ran the ancillary buildings in collaboration with the Northern Lighthouse Board.

But community right to buy rules and £224,900 from the Scottish Land Fund have now enabled the trust to take over, opening up access new funds from fresh sources to help with emergency repairs and their plan for improved tourist and community spaces.

However, theirs is not the only community to seize control of its local lighthouse.

Roughly 250 miles away at Mull of Galloway, ancillary buildings at Scotland’s most southerly lighthouse and 30 acres of peninsula heathland were taken over by the local community in 2013.

It is now a venue for weddings, concerts, craft fairs and garden parties. There are cottages to rent, lighthouse tours, a lighthouse museum, and, in partnership with bird organisation RSPB, the surrounding area is a nature reserve.

Maureen Chand, Chair of the Mull of Galloway Trust, said it was important for the community to take over the lighthouse.

“I can remember being a wee girl and climbing up the tower. It seemed huge,” she says. “In those days, on a Sunday afternoon the principal keeper would allow the lighthouse to open to visitors.

“At the top, you can go outside to stand on the balcony, and on a good day you can see the Lake District, the Isle of Man, Mull and right up to Belfast Loch.

“When lighthouses became automated and the NLB decided that the buildings were redundant, we knew that if three individuals bought the cottages, it could impact on parking and the occupiers not wanting tourists.

“The lighthouse was part of the area, and we didn’t want it to be lost.”

Back at Ardnamurchan, Davie sums up the lure of the lighthouse: “People love the history, and people are just fascinated with them,” he says.

“They are built on fairly challenging sites, yet the Stevenson family created buildings that would stand forever.

“There’s also the romance and loneliness of the lighthouse keeper.

“But as a community, the sea was the way people moved around, and the lighthouse has been central to our lives,” he adds.

“Now the community is in control we want to make it more useful so it’s more than just a tourist thing.”