CLARE Mackintosh warns that there will be tears – and there are. How could there not be as I am asking the bestselling, award-winning novelist to relive the moment when she and her husband made the agonising decision whether to keep their gravely ill son alive, or remove his life support and let him die.

Alex and his twin brother, Josh, now a "perfect" 12-year-old, were born prematurely at the John Radcliffe Hospital, Oxford, via IVF. After three agonising weeks, Alex developed meningitis, affecting every part of his brain and profoundly disabling him. Mackintosh and her husband, Rob, were told the decision needed to be made swiftly, and by both of them. She asked the consultant what would happen if they couldn’t agree.

"She said 'you have to,'" recalls Mackintosh, 42, wiping away tears at the memory. "It was horrendous but we agreed to let Alex die when he was five-weeks-old.” It is a judgment, she admits, that she still doubts. "I think of him every single day.” Afterwards, the couple had to return to the neo-natal intensive care unit for several months for their surviving son, who remained seriously ill. "The first time we walked past Alex’s empty crib was awful, really awful, but we had to keep going, getting up each day."

Now, the policewoman-turned-writer of three psychological thrillers that have sold more than two million copies has drawn on that heartbreaking experience in her powerful, life-affirming new novel, After the End. The book is narrated alternately by Max and Pip, loving parents of a desperately sick toddler. They must make the devastating decision about their son’s future but they fundamentally disagree, which leads to a cruel and public legal battle. There is also a media storm, as with distressing cases in real life, such as those of Charlie Gard and Alfie Evans.

Although she and her husband were still working for the police at the time of Alex’s death, Mackintosh always knew she would write a work of fiction inspired by her family’s experience. "I knew more than a decade ago that I would write this book, although I’d never written anything, and it’s very much the way I originally imagined it."

How difficult was it to write? “Incredibly difficult,” says Mackintosh, who lives in North Wales with her husband, who works with a mountain-rescue team in Snowdonia, and their three children. "Writing this book has brought me great joy because it’s not a story about loss, but hope. It’s about what happens after unavoidable tragedy."

In the cleverly structured book, she explores two possible outcomes as lives are irreversibly changed.

"In some ways it was hard but I loved writing this book so much," she explains. "I’m finding it difficult to write a new book because my head is still in Max and Pip’s world. I think it will be like that for a long time, although this was a cathartic book to write.

"I am not very good at managing grief; I tend to shut it away in a box, keep a lid on it because it’s the easiest way to get through things. I know that’s not a particularly healthy way to do it. Researching and writing this book helped me to explore my grief through the filter of a fictional character so that I could write all the things I’ve felt over the last 12 years without it feeling quite as raw. Now it sometimes feels as if it all happened to somebody else. It seems such an extraordinary thing to have happened, just too horrific."

She stops to take a sip of tea. "It is such a cliche to say this book wrote itself but it really flowed. I’ve never looked forward to writing so much as I did with this book. Normally with a book I can’t wait to let it go because I’ve read it too many times, after all the edits, but I did not want to let this one go. It’s very special to me, especially the ending.

"As a child I loved the Choose Your Own Adventure books. I read them with my fingers holding the pages so that I could go back and change my mind. I am really fascinated by these sliding door moments. When I was in the police – Mackintosh served as a police officer for 12 years, rising to the rank of inspector – I met a homeless girl, a heroin addict, who was begging in Oxford. We chatted over a period of months.”

She was exactly the same age as Bristol-born Mackintosh. “Same year, almost the same month. We had both gone to university at the same time. We’d both read French. Halfway through her degree her father died. She’d had no support network and started taking drugs. Now, three or four years on, I was standing there as a police officer, having graduated, and she was on the streets, a heroin addict. It brought home to me how fine the line is between the choices we make and those that are sometimes made for us. Life is a very precarious thing.”

There but for the grace...? "Exactly that! There But For was actually one of my working titles for this book."

The daughter of a doctor at Stoke Mandeville Hospital, Mackintosh's high-flying career as a police officer taught her many things, especially empathy. "Being in the police taught me a huge amount about walking in peoples' shoes. It also taught me to compartmentalise. When I was writing Max’s chapters, I had huge sympathy for the way he came across as quite angry, buttoned-up and in control when inside he is breaking.

"Like many premature babies, Josh was in and out of hospital. When he came home and got a cold, he would stop breathing. His lips turned blue and I massaged his chest. This happened when I was with the GP and I said, ‘Good, you can see what he’s doing.’ She panicked and called an ambulance. There was this big drama. A few days later we had a visit from a health visitor because the GP was concerned that we had been unfazed and not panicking, not emotional enough. It was, she thought, unnatural and alarming.

"We were both police officers, very used to dealing with a crisis and the fall-out, but in the moment you handle it in a calm, controlled way. Also, we had spent four months in intensive care dealing with far, far worse things. For us, we were just managing the situation. I thought about that a lot when writing Max, exploring the disconnect between how someone looks and how they feel."

Has being a police officer made her a better writer?

"Undoubtedly. I think it lends my work a unique authenticity. The main benefit of my police experience has been my interaction with people at moments of crisis, whether they’ve been attacked, burgled or bereaved. There’s a rawness to that moment and being a police officer is being a storyteller. When you are taking a victim’s statement, they start at the end, with what has just happened, and you have to take them back to the beginning. You write in the victim’s words –that’s the compelling evidence."

Seven months after Alex’s death, Mackintosh fell pregnant naturally. “I was terrified that history was going to repeat itself," she says. "I was really quite hysterical because I was convinced that I was having twins. I had an early scan and I was right. It was a very difficult pregnancy, psychologically, because at no point did I think I would leave the hospital with two babies.

"When I was pregnant, I developed an aversion to twins, crossing the road if I saw a double buggy. It was a long time before I was able to bond with Evie and George.” She pauses and smiles through her tears. “But, yes, I have now, very much so.”

After the End, by Clare Mackintosh, is out now on Sphere, priced £12.99.