Claire Askew was 10 years old when Thomas Hamilton shot dead 16 children and their teacher in the Dunblane massacre. Claire was a primary school pupil elsewhere in Scotland, in the Borders town of Kelso.

Twenty two years later, the fear and confusion planted that day have emerged in a novel about a shooting in a Scottish college.

“It’s been brewing for a long time,” says Claire of her book, All The Hidden Truths. “Dunblane had a seismic effect on everyone in Scotland. I don’t think the aftermath ever really left me. Probably because of that I’ve been fascinated by this kind of event ever since.

“I think I remember the day after more clearly. Suddenly there were visible changes. Parents used to wander in and out of the school.

“After Dunblane, the doors were locked. We had to line up to be let out. Then CCTV came in. There was a change in atmosphere. When you’re 10 you can’t really understand the magnitude of the act. All the adults around me were really shaken up. It’s really a loss of innocence moment.”

Claire, 32, also has vivid recollections of the Columbine shootings three years later, when two teenagers killed 13 people.

“I’d just started high school and that happened at a high school. For all that it happened in the USA, I had a feeling of ‘The world is not as safe as I thought it was.’ The people who would be my peers if I lived there are the ones doing this sort of thing. Everything is not as ok as you think.”

All The Hidden Truths skilfully uses this sense of life irretrievably darkening. It is set in the aftermath of a lone gunman killing 13 women then himself at a fictional Edinburgh college.

Claire lives in the Scottish capital and is a regular visitor to the Wetheral home of her parents John and Chris, where much of All The Hidden Truths was written. Her debut novel has enjoyed superb reviews and was named September’s Crime Book of the Month by The Times.

It is not so much a whodunnit as a why. The characters search for answers in something senseless. DI Helen Birch leads the police investigation. Moira Summers is the mother of killer Ryan Summers. Ishbel Hodgekiss is the mother of his first victim.

Their viewpoints dominate the novel but ultimately these women are powerless. At one point DI Birch says “This sort of crime... a crime with no bad guy? Victims are all there is.”

It is rare for a week to pass without a mass shooting in America. Claire says: “They’re usually followed by someone saying ‘Your book is so topical.’ I really wish it wasn’t. Part of me thought ‘Should I write this? Does it need to be rendered in fiction? Isn’t there enough of this in the world?’

“When it happens there’s a tendency to jump to lazy conclusions about the shooter or the victims. We need to have a more nuanced conversation.

“It’s about gun control but not just that. It’s about masculinity but not just that. Until we address the issues it’s going to keep being a recurrent problem.”

Masculinity: discussing writing with young men in a further education college was another catalyst for Claire’s book.

“These young men might be called challenging or difficult. I realised how readily they would resort to violence when provoked. They were lovely one to one. But in a group they would needle each other to see how much of a reaction they could get.

“They would respond to most difficult situations with anger and frustration. They often didn’t have a way to access their emotions. Yet I still liked them. Once you got under the surface they could be really fascinating. It was getting past that masculinity barrier.”

At one recent book event an audience member suggested to Claire that when young women feel frustrated they turn it inwards, while boys tend to hurl their anger at someone else.

Claire says: “I’m still pondering the question. The book is pondering it. There’s something about how boys are brought up. We don’t teach them to express emotion. You can see in the way politics is being played out in America how toxic masculinity is being increasingly legitimised.

“I think masculinity has changed a lot. When I think about my grandfather and his generation of men, there was a real chivalric code. He had four daughters and was extremely careful to be respectful of them.

“He was a very gentle man. I feel men of my age are less able to be emotionally gentle. I don’t know if it’s because of social media, role models promoting a masculinity that’s more brittle... I don’t know.

“I think it’s very difficult to be a young man now. The Me Too movement: I’m a great supporter. A lot of teenage boys I know see that as a minefield of ‘What’s acceptable for me to do anymore? I’m going to end up accused of something.’ They feel they’re being set up to fail, which obviously isn’t the case. But our social education systems can’t keep up.”

Claire’s biggest challenge in writing All The Hidden Truths was ensuring that refusing to give easy answers about Ryan Summers did not mean she was excusing him.

“When something like this happens we have a tendency to theorise about why people do things. Was it because they were listening to Marilyn Manson or playing violent video games? We want to find a tidy answer. I wanted to make it difficult for people to do that with Ryan because it’s not true to life. But he has done a terrible thing.”

Several times her book suggests that under certain circumstances, anyone is capable of killing. It also acknowledges how uncomfortable this thought is.

“We’ve all said things like ‘I want to kill that person’, in frustration. We’ve all made empty threats. I don’t think it’s that much to cross that line. With Ryan, the wrong set of circumstances comes along to push him to do this thing. He just crosses the line. I’m interested in where our limits are. I don’t think someone like [Columbine shooter] Dylan Klebold was particularly an outlier. He was an ordinary teenage boy. The wrong circumstances came together and led him to snap.

“I began to see how those events can happen suddenly in schools and colleges in America. I wanted to write something set in Scotland that played on that. I wanted to start a conversation about not getting complacent. I think we have all the necessary ingredients for an event like that. It just hasn’t come together.”

At least not since Thomas Hamilton snapped in Scotland, or Derrick Bird in Cumbria. “The amount of people who were directly affected by Dunblane who have come up to me and said, my niece or nephew was at the school that day. After a book event in Carlisle a couple of people talked to me about Derrick Bird. It does kind of start a conversation that goes into difficult territory. I want people to think about these things.”

Using writing to examine issues - both social and personal - is nothing new for Claire. Her many hats include successful poet, writer-in-residence at Edinburgh University, and freelance provider of community-based projects.

She has worked with female refugees and asylum seekers in Glasgow and homeless women in Edinburgh. “We brought them together for a year of weekly sessions. They talked about what they had in common. They wrote poems and stories and made films about integration and busting myths about asylum seekers.

“I worked with some of the older women at Waverley Care, [Scotland’s HIV and Hepatitis C charity] exploring their life experiences through writing and raising awareness about the stigma of HIV.

“Largely I’m surplus to requirements. What they need are a framework to work from. They’ve got all the ideas and experiences themselves. Once they’ve seen how versatile creative writing can be, they’re usually away.”

Claire has just finished the first draft of her second novel, which also features DI Helen Birch. All The Hidden Truths is dedicated to ‘all the students I worked with at Edinburgh College. You taught me way more than I ever taught you.’

Such as? “There were often lessons where I would be talking about a poem I would be familiar with. A teenage boy who made no secret of the fact he hates this stuff would come out with something which changed my understanding of what I thought the poem was about.

“It’s very easy to make assumptions about a 16-year-old boy in a hoodie with tattoos on his neck. Then you realise he’s saving all his money to get his tattoos lasered off. He’s looking after his elderly granny. Young people are very closed books. When you get to know them, there’s usually much more going on under the surface. That’s a real lesson I learned from those students. Not to jump to easy conclusions about people.”

* All The Hidden Truths is published by Hodder and Stoughton.