WHEN he was growing up near Alness on the Cromarty Firth, David Macpherson would often gaze in awe at the oil rigs that loomed high above the water, watching as these mighty beasts were towed into the bay for repair.

A seed was planted that, some decades later, would germinate into the idea for a TV series. Macpherson’s scriptwriting debut will arrive on our screens in the not-too-distant future with The Rig, a sci-fi thriller set off Scotland’s north-east coast, destined for Amazon Prime Video.

“Oil rigs and that world had always been a part of my life growing up,” says Macpherson. “When they are in getting repaired at Invergordon, they tower over the town and you see them wherever you are.

“My dad used to build rigs at the yard in Nigg and then, when we were a bit older, he started working offshore. He would always come back with lots of stories about all the strange things that happened out there.

“That world has fascinated me because it is such a big part of Scotland’s story,” he continues. “There’s so much tied up in it, yet it is also still a very hidden world. Unless you actually work out there, it is very hard to imagine what it is really like.

"Even with my dad and lots of my friends working offshore, having heard all the stories, it is nothing compared to being there and up close.”

The Herald: Oil rigs in the Cromarty Firth at Invergordon. Picture: Jeff J Mitchell/GettyOil rigs in the Cromarty Firth at Invergordon. Picture: Jeff J Mitchell/Getty (Image: Jeff J Mitchell/Getty)

In the telly universe, sometimes the planets align perfectly. Certainly, that would appear to be the case with The Rig, currently being filmed in Edinburgh. The six-part drama, being produced by Wild Mercury Productions as an Amazon Original series, has secured an impressive cast.

The line-up includes Game of Thrones actor Iain Glen and Schitt’s Creek star Emily Hampshire, alongside Line of Duty’s Martin Compston and Rochenda Sandall, as well as Mark Bonnar and Emun Elliott, who both starred in hit BBC Scotland series Guilt.

Directed by John Strickland (whose work you may know from Line of Duty and Bodyguard), The Rig is being shot in the recently unveiled film and TV studio at Port of Leith, run by actor and director Jason Connery (son of the late, great Sir Sean Connery) and the Oscar-nominated producer Bob Last.

Macpherson, 34, is delighted with how things have panned out. “I always wanted a strong Scottish element to the cast,” he says. “Someone said to me yesterday: ‘It’s like we have got the Scottish Avengers’.

“The offshore world is like a microcosm of the whole country and we wanted to reflect that as well. Oil is an international business, so it was great to get [the Canadian actor] Emily Hampshire on board.”

READ MORE: Line of Duty: 10 reasons why we love the hit police drama

Any writer worth their salt would be thrilled to work on such a big-budget production. Throw into the mix the fact that this is his first big TV job and it is little wonder that Macpherson has the air of a man still pinching himself.

“This is a bit of an anomaly,” he admits. “The Rig is going to be my first show in production, and I also haven’t worked on anyone else’s show.”

We speak on a Friday morning in late March. It is a storm-lashed day as his voice drifts down the line from Leith where Macpherson is on set for the early days of filming. “It is pouring with rain – very North Sea appropriate,” he jokes.

The Rig centres on the fictional Kinloch Bravo platform where, as the crew prepare to return to the mainland, an eerie and strange fog suddenly sweeps in.

“Many of them are waiting for their helicopter to arrive to take them home and back to their families,” explains Macpherson. “As they wait, things start to go wrong, and then this mysterious fog descends.

"They lose all communications with land. From that point, things really start going wrong. The power structures on board start to fall apart. People are afraid and angry. They have to deal with that and work out the mystery.”

Macpherson loves sci-fi (“I am big fan of the Alien films and John Carpenter’s The Thing set in the Antarctic”) and believes that the genre will translate well to an oil rig.

“It is such a massive setting – the engineering is so large and overwhelming – I wanted a story that matched it in scale,” he says. “We are playing with a lot of big ideas about where we are nowadays in the world and where we might be going.”

The Herald: David Macpherson, writer of The Rig. Picture: Mark Mainz/Amazon Prime VideoDavid Macpherson, writer of The Rig. Picture: Mark Mainz/Amazon Prime Video

Ahead of filming, Macpherson and the production team did a location-scouting trip to the Stena Spey rig off Orkney. “If you want to go to the rigs that are far out [in the North Sea], you need to have done the helicopter training,” he says.

“This one was being repaired in Scapa Flow and because we could get a boat to it, we were able to visit. We had a great tour from a toolpusher called Thor.”

That pivotal backdrop, he says, has been impressively replicated at the studio in Leith. “Rob Harris, our production designer, has done an incredible job of building our sets. Once you get onto the set, you really believe you are out in the middle of the ocean.”

Macpherson is a congenial interviewee with no shortage of interesting anecdotes, not least on his winding path – or “origins story” as he dubs it – to becoming a screenwriter.

After studying history and philosophy at Glasgow University, Macpherson moved north and did a stint working for the late Liberal Democrat MP Charles Kennedy, then spent a year based at Westminster within the party’s Whips’ Office in the House of Lords.

Switching careers, Macpherson returned to Scotland for a spell as a civilian researcher for the police in Aberdeen (“I worked in the youth justice unit dealing with victims of crime and young offenders”) before upping sticks to Edinburgh.

READ MORE: Chapel of the heart: How Orkney's wartime past inspired a new novel

Writing has long been his dream. “I felt like, if you are going to be a writer in Scotland, Edinburgh is the place to be,” he says. “I wanted to go back to university but wasn’t confident enough in my writing to do one of the creative writing or screenwriting courses.

“Instead, I did a masters in environmental studies for a year and then I worked for a sustainability charity. That was my last job before this.”

All these incarnations – through politics, the police and environmental issues – have planted further seeds. Macpherson must have some cracking plot ideas up his sleeve?

“I think it is a good thing for a writer to fail at lots of other things first,” he muses. “Then you have lots of experiences to draw on. That life experience has become very valuable.

“They always say, ‘write what you know’ and that doesn’t necessarily have to mean autobiographical. The more you can experience in life as a writer, you more you have in your wheelhouse to draw on.”

What was it like working for the late Charles Kennedy, a giant of Scottish and UK politics? “I looked up to him a great deal and he taught me a lot,” says Macpherson. “I used to sit in on his constituency surgery appointments and he had a great memory for people and such a warmth about him.

The Herald: The late Liberal Democrat MP Charles Kennedy. Picture: Kirsty Anderson/The HeraldThe late Liberal Democrat MP Charles Kennedy. Picture: Kirsty Anderson/The Herald

“Whether they agreed with him on issues or not, that wasn’t important to him. He was there to serve his constituents. People would come in and say: ‘Oh, you probably don’t remember me …’ and Charles would always say: ‘Ah, you are … and we met here 16 years ago … you wanted to speak to me about …’

“He was so connected to his area that he was the perfect representative for the Highlands. It [Kennedy’s death in 2015] was a great loss to Scotland.”

Macpherson published his debut novel, Here Be Dragons, in 2018 (“I’m a big Terry Pratchett fan, so it was my stab at that”) and has a script in development with the production company Balloon Entertainment, run by veteran Scottish TV writer Bryan Elsley.

“That script is called Wrath,” says Macpherson. “I call it ‘Scottish Fargo’. It is set up around Cape Wrath and it is a dark, crime thriller. We are still very keen to make it.”

READ MORE: Spokes for women: The cycling pioneers who pedalled for freedom

In the meantime, his focus is on The Rig with filming expected to last until the summer. “We started the scripts in December 2018, so it has been living in my head for so long now,” he says. “To actually see it all come to life is going to be exciting.”

The Rig is coming to Amazon Prime Video next year