FROM Balintore, the village in Easter Ross that Clio Gray has made her home, you can look across the Moray Firth to Culbin Sands, a broad sandbank near Findhorn. In the 1630s, she tells me, the original village on the site was obliterated in a freak sandstorm. People ran across fields to safety while the sand engulfed their homes. She has read about it.
Gray's world is coloured by stories like this, gems she has found in old, rare, obscure books, half-lost snippets of history. They burrow their way into her novels and stories. Writing, she says, is "just a way of bringing all those wonderful things together and making sure they're not completely lost forever."
The eyewitness account of the Findhorn sandstorm, for example, came in useful in her latest novel, The Brotherhood of Five, out this month, in which she describes a similar disaster in Thanet, at the eastern tip of Kent. It's a vivid beginning for a historical thriller, her fourth featuring missing-persons investigator Whilbert Stroop.
Sitting over a pot of tea after hours in Tain Library, where Gray is a part-time librarian, we are where she is happiest: among books. Her house, she says, is full of them. Apart from her dogs, they are her most constant companion. She plans her holidays around visits to second-hand bookshops. Her favourite solace is to reorganise her books.
She knows all her books, she says. She would know if one were missing. "I lent a few once to somebody and they never gave them back. That was a long time ago and I can tell you exactly what those books are and what's in them. I regretted it and I regret it now."
She reads voraciously: histories and travelogues, novels and nature books. She speed-reads bestsellers "to see what people are reading". When she comes across something that interests her it is catalogued, referenced, added to her personal database. No book is wasted. "Everything you read can give you a different viewpoint. It adds that bit more to your life experience, which can go into maybe the next book, or a story."
Research becomes a journey through places and times. A particularly interesting fact can change the direction of a plot. A short story might be shaped just to include one.
"When I come across a single fact that I find quite interesting, I'll follow that fact, which usually leads me to something else and then something else. And so you end up with this beautiful, serendipitous journey. I love it, it's a really pleasant way to spend your life."
Gray came to the notice of many in Scotland when she won The Scotsman & Orange Short Story Competition in 2006 with I Should Have Listened Harder, about a man facing death in a prison mine in a place called Nertchinsk (she came across it in a book).
At this time, her first novel, Guardians of the Key, was being considered by publishers Headline, after winning the Harry Bowling Prize for an unpublished book set in London. Gray knew she wanted to enter, but loathes cities in general and London in particular. She found a solution in the past – "when London was more or less a collection of villages".
Victorian London, she felt, had been the subject of enough spilled ink. But she found a period to her liking in the early 1800s. Europe was in turmoil with the aftermath of the French Revolution and the ongoing Napoleonic Wars; the industrial revolution was just around the corner. "The past is another country," she says. "I just feel it's somewhere I belong to."
All her books are infused with moments of history: London's silk traders and the relics of the city of Lucca (Guardians of the Key); the port of Odessa, and a curious Pennines mansion (The Roaring of the Labyrinth); the islands of Saareema, off the Estonian Coast, with their strange Jurassic landscape (The Envoy of the Black Pine). The art is in weaving disparate snippets into compelling historic mysteries.
Gray cheerfully ignored the advice often thrust at new writers to "write what you know". "I think writing what you know is extremely dull. How many people have lives that are interesting enough that other people want to know about? I think the better piece of advice is write what you'd like to read – you might end up with something half decent. That's what I do."
She does admit to an interest in death. She writes about turbulent times when death was an ever-present neighbour. "We do forget how close death was. It's a common theme in just about everything I write. We're very blas today, we expect to live until we're 80. Back in the 1800s, 30 per cent of the population never made it past 40. I am rather morbid, I suppose. I like reading about these things."
She does add some fairly macabre deaths of her own. In The Brotherhood of Five, a man falls – or is pushed – into a vat of molten lead, which was part of a complex of towers on the Thanet marshes for making lead shot. "I was imagining the tower, how they would melt all the lead and so forth. It was kind of obvious really, to chuck somebody in. It is quite gruesome, isn't it? But quite interesting. I tried to research it.
"I wrote to a couple of people to ask what would happen if somebody did go into a lead vat that was beginning to boil. But none of the answers that came back were much help, so in the end I just made it up. There comes a point where unless you carry out experiments by dropping cats into vats, you're never going to know. And where would you get all the lead?" She pauses, grins. "I could rustle up the cat."
From an early age, Gray, who was born in Yorkshire, showed both an interest in the macabre and a voracious appetite for information. "I was reading Hitchcock by the time I was about ten. I remember my primary school teacher called my mother in because she was worried about the deep, dark nature of things I was writing at school. I used to catalogue what colour cars went past the window, make maps of our local stream. It's all there, isn't it? The seeds."
At Leeds University, she "didn't stick to the curriculum", instead immersing herself in its idiosyncratic libraries. "I'd come across books that hadn't been issued for 70 years. Linguistic books and dialect books and books on the Armenian genocide in 1914, which no-one had ever heard of at the time. I used to spend a lot of time at the medical library, which had all these fantastically gory journals on bizarre ways people die. The difference between manual strangulation and ropes, that sort of thing." Discovering she loved research, on graduating she spent an unemployed year writing her own independent dissertation. It could have been a surprise to no-one when she got a job as a university librarian.
Seventeen years ago, after finding discarded syringes in her local park, she handed in her notice, packed her camper van and headed north. A mechanical fault at Fort William prompted a diversion to Inverness where she was referred – she still has no idea why – to Ken's Garage at Kildary in Ross-shire. She drove to Balintore, parked up and never left.
Scotland is where she started to write. "First I wrote 'world-from-your-armchair' type books, the kind of things they used to write in the 1930s. They described nature to you in a story-type manner, which is a bit of an art that has been lost now.
"It was really for my own satisfaction, I used to paint all the pictures for them." Then came four novels, which failed to find a publisher. She regrets none of it. It was all the learning of a craft.
Switching to short stories, she started entering competitions – and winning prizes. A collection of her stories, Types of Everlasting Rest, has now been published by Two Ravens Press. Her novels have established her as a writer of highly original, intricately plotted crime fiction, which has depth as well as pace. Writing in The Scotsman, Allan Massie described her as "uncommonly interesting writer" – if a slightly morbid one.
Now she is in the process of developing a new historic crime series set in Helmsdale and Brora where (she discovered in books) there was a mini-goldrush in 1868. "I think it will be good for me. You can actually get trapped in a web of your own making."
Crime interests her, she says, because it gives the writer a broad vista, a storyboard on which a range of strands can be incorporated. "I like the solving of things. It gives you quite a large vista, you can bring in quite a lot of external things.
"I can't bear reading books about failed marriages."
More than that, I suspect, crime interests her because death interests her. "The mechanics of death are quite interesting, and the implications. Someone is gone from the world. And how you can never know if there's anything on the other side. That's interesting, don't you think?"
• The Brotherhood of Five is published by Headline, price 19.99. Clio Gray is appearing at the Edinburgh Book Festival with fellow crime writer Catriona McPherson at 6:45pm tomorrow.