It’s appropriate that a man dealing in births (he makes up stories) and deaths (people get murdered in them) lives and works in the grounds of an old hospital. And not just any old hospital: Ian Rankin’s home and office are in adjacent buildings in Quartermile, a swanky development of loft apartments on the site of Edinburgh’s historic Royal Infirmary. If you don’t know the area it’s bang in the middle of the city and a short walk from St Leonards Police Station, workplace of Rankin’s most famous literary creation, John Rebus.

The Quartermile office is where I am now, eating a biscuit, sipping coffee and scanning the hundreds of CDs housed in towering stands. Rankin does like his music. We’ve exchanged greetings, negotiated a few opening pleasantries – the usuals: weather, football, early Hawkwind albums – and are settling down to the business at hand.

It turns on what Rankin did in lockdown last year and what he produced as a result of it. While most authors spent their period of writerly isolation alone, Rankin had an august companion whispering in his ear and peering over his shoulder: William McIlvanney, award-winning author of Docherty and the Laidlaw series of crime novels.

McIlvanney died in 2015, two years after the Laidlaw novels had been re-published and catapulted their creator into the crime fiction limelight from that semi-obscurity in which many literary authors ply their trade. Today, to many, he is no less than the Godfather of Tartan Noir, a genre of crime writing set in our northern latitudes and circumscribed by our northern attitudes to life, death, sex, taxes, politics, religion and the rest of it.

READ MORE: Rankin ups the role of women in McIlvaney novel

But though the Glasgow-set crime series stretched to only three books in McIlvanney’s lifetime – they are, in order, Laidlaw, The Papers Of Tony Veitch and Strange Loyalties – the author left plans for a fourth novel. He even had a title for it: The Dark Remains. It’s that which so occupied Rankin last year. He has taken what McIlvanney left and completed it, stepping into the big man’s shoes and, as best he can, imitating his authorial voice.

The neat, official version is that Rankin has completed the unfinished manuscript of The Dark Remains. Not quite true. It was a far messier process which, in a sense, makes the achievement that much greater.

Here’s what happened. McIlvanney’s partner, Siobhan Lynch, found handwritten notes among his papers. They were undated but outlined plans for a fourth Laidlaw novel, a sort of prequel. She deciphered them as best she could and typed them up. Then she passed them to Canongate’s publishing director Francis Bickmore, who in turn passed them Rankin. Would he take a look? There might be something in it. There was. But what? “When I first saw the notes I thought maybe a long short story or a novella,” Rankin explains. “But when I started to add things to it, it grew wings.”

He digs into a box of file folders near his desk – “nope, nope, nope” – and eventually finds the one he wants. He pulls from it a sheaf of papers, puts it in front of me and flicks through it quickly. It’s Lynch’s document. “You’re not seeing many complete bits, are you?”. True. It doesn’t look like much. Bits of dialogue, passages of description, musings, a few longer blocks of text, one line ideas for short stories featuring what McIlvanney calls ‘Young Laidlaw’.

What it does have are the opening two chapters and a postscript. But there is no ending, no climax. “He didn’t actually have a scene where Laidlaw works out what’s going on,” says Rankin. “I had to do that. It was almost like an act of archaeology as I dug into his notes and tried to see what was in his head … Some of it I could use, some I couldn’t use. One thing I knew is that it was October 1972 because he name-checks The Godfather. I went back and checked and it was released in September so I thought ‘OK, it’s probably still playing in Glasgow’. So I knew that. And the first Laidlaw book was published in 1979 so it’s probably set in 1977. So this is five years before.”

And how does a Fife-born, Edinburgh-based writer research the Glasgow of the 1970s anyway? From the newspapers of the time, of course. For a brief period during lockdown, the National Library of Scotland opened its doors. Rankin booked a slot and spent a precious few days ploughing through archive editions of The Herald.

“That was invaluable, getting in and seeing what kind of cars people were driving, how much they cost, how much a flat or a house cost, what was on TV, what was happening in sport, what was happening in the world – Upper Clyde Shipbuilders were having their lock in, there was a lot of unrest in Northern Ireland. So it was really good to get all that. There was one wee thing I wanted to sneak in and couldn’t, and that was mention in October 1972 of a young writer being taken on by Strathclyde University to do creative writing. That was a guy called William McIlvanney. It was so funny see that name jumping out at me in a newspaper from 1972.”

The Herald:

One thing did need updating. The original novels reflect the macho, male-dominated city Glasgow was in the 1970s and 1980s. In The Dark Remains, the role played by women is given a much-needed boost. “Reading the Laidlaw books, it’s a world of men sitting in smoke-filled bars psyching each other out, trying to play mind games with each other. And if the mind games fail, it turns to physical violence.” In The Dark Remains, however, “there’s more input from a woman’s perspective. There are very few female roles in the Laidlaw novels whereas his wife gets a little bit to do in this new book, as does Bob Lilley’s wife, as does the wife and family of the victim.”

As for the process of actually writing the book, “it had to be an act of ventriloquism. I didn’t want anybody to hear or see me, or hear or see my worldview or my philosophy or my characters. It has to read like Willie McIlvanney had written this. It was a homage on my part and I didn’t want it to be my book, I wanted it to be his story.”

And so the trilogy is now a quartet, with a novel set in the late autumn of 1972 – half a decade or so before the events described in Laidlaw – and following Laidlaw as he investigates the murder of lawyer Bobby Carter, consigliere to underworld figure Cam Colvin. It offers first glimpses of characters who feature elsewhere in the trilogy, such as Colvin himself, Laidlaw’s fellow police officers Bob Lilley and Ernie Milligan, and John Rhodes, another Glasgow gangster.

“I read and re-read the three Laidlaw novels and took notes, and took notes, and took notes. Docherty gets a mention in Strange Loyalties so I managed to shoehorn a mention of him into the books. Laidlaw begins with a minor gangster coming back from London and in my book I managed to have a scene where the gangster leaves to go to London. I invented that, just to give that circularity to it. So there’s quite a few characters from the series.”

McIlvanney’s son Liam is a celebrated crime writer in his own right, but him aside it’s hard to think of anyone more appropriate to complete The Dark Remains. For a start, Rankin and McIlvanney go way back and both their personal stories and the stories of their famous creations are inter-twined. Turn over a copy of Laidlaw and you’ll find a quote from Rankin which reads: “It’s doubtful I would be a crime writer without McIlvanney”. Why? It’s all about permission: in the 1980s, Rankin fancied himself a literary novelist. McIlvanney already was one, but then he went and wrote a crime novel. To Rankin’s mind, that meant crime fiction was literature. For him, that was a game-changer.

READ MORE: How The Herald played its part in new McIlvanney book

“So the barriers had gone, the barriers between commercial or mainstream novels and literary fiction had dissolved because a literary novelist was writing crime fiction. So when I got an idea for a crime novel I thought ‘I can write this. It’s OK’. Laidlaw himself was a very literary character. He reads obscure books of philosophy.”

He does indeed. Instead of alcohol his locked desk drawer contains works by Albert Camus, existential philosopher Soren Kierkegaard and Basque anti-Franco polemicist Miguel de Unamuno. Rankin brought some of that flavour to John Rebus.

The pair met for the first time in 1985, at the Edinburgh International Book Festival. It was a fateful encounter. Rankin turned up clutching his copy of Docherty – he couldn’t find his copy of Laidlaw, history’s loss as it turns out – and had McIlvanney inscribe it. Before McIlvanney put pen to paper, however, Rankin told him about the crime novel he was working on. McIlvanney responded by writing: “Good luck with the Edinburgh Laidlaw”. Guess who.

Five years later, Rankin had moved to France to write and had published Knots And Crosses, the first Rebus novel. Returning to Scotland to publicise a new novel, he wound up at a reading in John Smith’s Bookshop in Glasgow. A crowd of a dozen or so had assembled to see the tyro crime writer, all on their haunches or leaning against the wall because nobody had thought to put out seats. “And then McIvanney wanders in and sits down on the floor and watches me and listens and buys a copy of the book and I sign it for him and off we go to the pub. The Horseshoe Bar I think. Him and me. For a chat.”

They stayed in touch over the years, corresponding and meeting occasionally. But one of Rankin’s most vivid memories comes from what he calls McIlvanney’s “fantastic third act”. It was at the Theakston Old Peculier Crime Writing Festival in Harrogate in 2013, the year Canongate took the decision republish all three Laidlaw novels. At the time, incredibly, they were out of print – and this despite Sean Connery once having been interested in starring in a film version.

The Herald:

“I was interviewing Willie on stage at ten in the morning or something,” Rankin recalls. “He said ‘Jesus, Ian, who’s going to come and see me? Nobody knows who I am’. I said: ‘Just wait and see’. We walked into a hall which was full – 800 people, standing room only – and he got this round of applause as he walked through the crowd to get on the stage. I could almost see him rise up from the ground because he was so emotional and so thrilled that so many folk hadn’t forgotten him. I think that was what pushed him towards making notes towards a new Laidlaw novel … he realised not only what a huge influence he had been on Scottish crime writers, but that his crime novels had not been forgotten.”

Since then, the Laidlaw novels have found new fans as Tartan Noir develops new voices and explores new tributaries off the main stream of gritty, urban-based narratives. Bloody Scotland, an international crime writing festival, awards the McIlvanney Prize annually to the year’s best Scottish crime novel. The name William McIlvanney now has a place in the crime writing pantheon. Writing about The Dark Remains, Lee Child no less describes it as “like witnessing Scottish noir’s Big Bang creation in the company of its greatest living exponent”.

When you read tributes like that, it’s a shame McIlvanney only left us one new Laidlaw novel. In fact, that isn’t quite the case. When Rankin delved into the notes he was given, he found a surprise there. “When I started reading it I thought ‘Hang on there’s two books here’. One he had planned out fairly well, which was the prequel. But I think he was going to bookend the series. I think he had in mind a final book, Laidlaw’s last case.” There was a title for that one too: A Murder Artist.

So will we see Ian Rankin’s name alongside William McIlvanney’s in a fifth Laidlaw novel? Sadly, the answer is an emphatic no. “There’s like four lines from what would have been the final Laidlaw book. There’s not enough for even a short story I don’t think. Maybe Canongate will give it to somebody else and say: ‘Do you want to do it?’. But I’m done. There wasn’t nearly enough there.”

Mind you, he adds, “no character dies these days”. So don’t write off Jack Laidlaw just yet. Someone, somewhere may still have plans for him.

The Dark Remains by William McIlvanney and Ian Rankin is out now (Canongate, £20)

UNFINISHED MANUSCRIPT? NO PROBLEM: FIVE NOVELS COMPLETED BY OTHER AUTHORS

Poodle Springs

Raymond Chandler was four chapters in to his eighth Philip Marlowe novel – working title: The Poodle Springs Story – when he died in 1959. The work remained unfinished until 1988 when, to mark the centenary of Chandler’s birth, it was completed and published by Robert B Parker, author of the Boston-based Spenser novels. In 1998, Bob Rafelson produced a film version with a screenplay by Tom Stoppard and starring James Caan as Marlowe.

The Silmarillion

When JRR Tolkien died in 1973 he left a collection of unedited drafts of stories he had intended as a sequel to The Hobbit. Rejected by his publisher, Tolkien wrote The Lord Of The Rings instead. In the mid-1970s, Tolkien’s son Christopher collaborated with Canadian fantasy author Guy Gavriel Kay to edit, collate (and in some cases re-write) the stories which would become The Silmarillion, published in 1977.

The Pale King

David Foster Wallace’s suicide in 2008 robbed American letters of its brightest star. On his death the academic, essayist and author of the hugely influential Infinite Jest left a 1000 page novel on his computer where it was found by his widow. His friend, Michael Pietsch, edited, organised and trimmed it to a completed novel of a mere 500 pages. The Pale King was published in 2012 and nominated for the Pulitzer Prize.

The Gathering Storm

American author Robert Jordan was 11 books into his epic fantasy cycle The Wheel Of Time when he died in 2007. Using his notes, fellow fantasy author Brandon Sanderson completed the novel. A fan of the Wheel Of Time series since he was 15, Sanderson realised the story couldn’t be told in one book, so what was intended as a dodecology eventually became a tetradecology with the publication of books 13 and 14 in the sequence. They were also completed by Sanderson.

Micro

With a focus on science and technology grounded in his Harvard medical training, American author Michael Crichton is best known for novels such as The Andromeda Strain, Congo and, of course, Jurassic Park. He died in 2008. Pirate Latitudes, which was more or less complete at the time, was published under his name in 2009, but Micro was only a third written. Using those scant beginnings and a plot outline, New Yorker journalist Richard Preston completed the techno-thriller and it was published in 2011.