There's a strong tradition in mystery writing of living writers continuing the work of dead ones. Think, for instance, of Robert B. Parker completing Raymond Chandler's unfinished final Philip Marlowe novel, "Poodle Springs," and, then, after Parker's death in 2010, of his own Spenser series being extended by fellow mystery writer Ace Atkins. Other so-called continuation novels have stretched the active careers of Agatha Christie's Hercule Poirot, thanks to Sophie Hannah, and Dorothy L. Sayers' Peter Wimsey and Harriet Vane, thanks to Jill Paton Walsh, who died last year (no word on who will pick up the series but I hope it's not James Patterson).

Some highbrows would scoff that series fiction lends itself to such artificial extensions of life because it's more formulaic than so-called literary fiction and, thus, easier to mimic. (Ha! Have they ever tried? Speaking as the author of the still-unpublished Nancy Drew mystery, "The Mystery of the Silver Pap Boat," I can tell you that Carolyn Keene, composite author though she may have been, is a tough act to follow.) A more generous take on these continuations is that mystery writers are fans like the rest of us and when a beloved series ends, they feel the urge to put their insider knowledge to use to prolong the magic.

Such must be the case with Ian Rankin and his "collaboration from the grave" with the late William McIlvanney, whose three Jack Laidlaw books, beginning in 1977, are recognized as the first of the "Tartan Noir" school of Scottish mystery fiction. When McIlvanney died in 2015, he left behind a handwritten unfinished manuscript of a fourth Laidlaw novel that was to have been a prequel to the Laidlaw trilogy. Rankin, who was inspired by the Laidlaw books to begin writing the John Rebus detective series, has taken up the challenge of completing his mentor's final work. The result is a standout, lyrically bleak novel whose teasing title, "The Dark Remains," can be taken to mean a few things — none of them good.

"The Dark Remains" is set in Glasgow, Scotland, in the fall of 1972. (References to topical events such as the U.S. presidential election sporadically pop up on the margins of the story.) Laidlaw has been newly assigned to the Glasgow Crime Squad. He's young, but has already established a reputation for having "a sixth sense for what's happening on the streets." That gift will come in handy given the turmoil that's about to erupt among rival organized crime syndicates in Glasgow after the disappearance of a crooked lawyer named Bobby Carter, the "right-hand man" of gang boss Cam Colvin. Colvin's ease with brutality is efficiently established in two sentences: "Colvin's was a name to instill fear, a reputation stretching back to teenage years when he had strode into a surgery demanding to see the doctor. Asked what the problem was, he had said nothing, instead turning round to show the receptionist the blade jutting out from between his shoulders."

Carter's corpse quickly turns up "lying spread-eagled in a handy puddle," and as Glasgow turns into a battle zone, Laidlaw, along with his new partner, Detective Sergeant Bob Lilley, who's always three steps behind, race around a city awash in rain, whiskey, vice and blood, ferreting out the sins of the past that motivate the crimes of the present.

As in the original Laidlaw trilogy, the writing here is so sharp that nearly every sentence could split open a haggis. (And I defy even the most ardent fans of McIlvanney and Rankin to determine which man wrote which passages.) For instance, here's a pub owner thinking back to his youth about how lucky he was to escape life in the shipyards: "Schooldays had been little more than a stretched-out assumption that he and his kind were destined for manual labour." The doctrine of social class as predestination has rarely been presented so succinctly.

The distinct appeal of "The Dark Remains," of course, is that it allows us readers to encounter the McIlvanney's philosopher/detective before he hardened into a granite legend. We peek into Laidlaw's unhappy marriage, where the tensions are so palpable that Laidlaw spends most nights in a hotel. (The feeble excuse, as always with these guys, is that work comes first: Laidlaw insists that he needs to be in Glasgow proper, not in a suburb, while he's in the thick of an investigation.) And, even the friendliest of Laidlaw's new colleagues finds his lofty turns of phrase and reading material hard to stomach. Take this one-sided exchange between Laidlaw (whose desk is littered with volumes by Unamuno, Kierkegaard and Camus) and Lilley. Laidlaw says:

"The law's not about justice. It's a system we've put in place because we can't have justice."

"Lilley thought: the man speaks like the books on his desk, the lines honed by rehearsal. But did they mean much of anything?"

As any student of noir — Tartan or otherwise — could tell Lilley, nothing turns out to mean much of anything in this fallen world. The solution to the mystery of "Who killed Bobby Carter?" is agreeably unexpected, but, as in so many excellent crime stories, by the time it emerges, many of us readers will be hazy on what set this investigation in motion in the first place. The point is the journey, to savor walking down the mean streets of 1970s Glasgow once again with the stoic Laidlaw. For that pleasure, we have Ian Rankin to thank and, one final time, the man himself, William McIlvanney.

Maureen Corrigan, who is the book critic for the NPR program "Fresh Air," teaches literature at Georgetown University.

The Dark Remains

By William McIlvanney and Ian Rankin

Europa Editions, 256 pages, $27.

COMING SUNDAY: A review of "Oscar Wilde: A Life," by Matthew Sturgis.