The year 1960 began calmly enough for Roald Dahl, but it would prove to be tumultuous in many ways. Kiss Kiss, his fourth collection of short stories, was published in the United States in March and stormed into The New York Times bestseller lists. As Dahl boarded the boat back from New York to England in early April with his wife, the actress Patricia Neal, he was pleasantly surprised to find that many of his fellow passengers were reading his book. Nor had this escaped the notice of two other passengers in the publishing business who were also making the crossing on the Queen Mary – the London literary agent Laurence Pollinger and the publisher Charles Pick.

Pick and Pollinger seized the opportunity to persuade Dahl that they were the team to revitalise his British career. Pick’s flattery worked a treat. “I have never been so assiduously and pleasantly wooed and wined and dined as I (and Pat) were on board ship by Messrs Charles Pick and Laurence Pollinger,” Dahl wrote to his New York agent Sheila St Lawrence on his arrival in England, informing her that from now on he intended Pollinger to represent him in Britain and Michael Joseph to publish both Kiss Kiss and the incomplete James and the Giant Peach.

Most significant of all, 1960 was the year that Dahl – who already had two daughters, Olivia, five, and Tessa, three – became the father of a strapping young son. Theo Matthew Roald was born on July 30, and the arrival of an exotic new male in this family of women was the cause of both excitement and fascination. “He has a pair of testicles the size of walnuts and a sharp wicked penis,” Dahl wrote a fortnight after his birth. Another progress report was despatched three days afterwards: “He’s a fine nipper, and his circumcised tool (now healed) glows with promise, like the small unopened bud of some exotic flower.”

Weeks later, the Dahls’ summer idyll was over. On October 1, they boarded a “ghastly Boeing jet” to spend another winter in New York. Dahl’s love affair with Manhattan was becoming ever more jaundiced. He viewed it as a violent place, filled with threats and danger. One day from his window he watched a tall boy with a “tense white face” running through traffic. Dahl identified with the youth. It seemed he was a kind of prophet, warning him that catastrophe was around the corner.

Like the child in his short story “The Wish”, terrified of stepping on the cracks in pavements or treading on the wrong colour in the carpet, Dahl had a premonition of disaster. His short story “Pig” – the masterpiece of Kiss Kiss – had explored his disillusion with the city. Dahl tells the tale of Lexington, a naive orphan who is raised by his kindly vegetarian relative, Aunt Glosspan, in the Virginia countryside. When she too dies, Lexington is forced to return to the grim dystopia of Manhattan — a city populated by moronic Irish policemen, who have killed the boy’s innocent parents, and corrupt Jewish lawyers, who will swindle the young child out of his rightful inheritance.

Finally, around the tale’s bitter last corner, lurks the slaughterhouse. There the unsuspecting young lad must come face to face with the true brutality of humanity. Dangling by his ankle from a chain, the confused Lexington meets his end at the hands of a “benevolent… wistful… cheerful” pig-sticker in rubber boots, who takes him “gently by the ear”, before deftly slitting open his jugular vein, thereby conveying him from this, “the best possible of all worlds”, into the next. Lexington was the same “white-faced boy” he had recently seen from his window. He had tried to dodge life’s dangerous cracks and failed.

Soon, this instinct that New York was no place to raise a young family would seem cruelly prophetic. On December 5 1960, just a few months after “Pig” was published, Susan Denson the Dahls’ nanny was bringing Tessa home from nursery school for lunch. She was also pushing four-month-old Theo in his pram and trying to manage a dog at the same time. It was her third winter in New York with the Dahls, and she fitted so well into their family that they had made her one of Theo’s godparents.

The weather was bitterly cold. They were walking down Madison Avenue and when they reached 85th Street, waited at the crossing for the light to change. When it did, Susan pushed Theo’s pram off the sidewalk and out into the road. At that point a cab careened around the corner and crashed into it. The driver panicked. Instead of braking, he stepped on the accelerator, ripping the pram out of the nanny’s hands and propelling it 40ft through the air, before it smashed into the side of a parked bus. Theo’s head took the full force of the impact and his skull shattered.

Both Roald and Pat were within earshot of the accident, but neither saw it. Roald was in a nearby apartment, writing. Pat, who had only recently finished shooting a small role in Breakfast at Tiffany’s, was in a local shop. She heard the police sirens, but did not initially realise her own son had been injured. An ambulance rushed the child to the nearby Lenox Hill Hospital, along with Susan, Tessa, and the dog. There, Theo was diagnosed with a neurological deficit. Almost everyone thought he was going to die. When Roald and Pat arrived in the emergency room, they faced a dreadful situation. Not only was their child horribly injured, but the doctors were disagreeing about what should be done.

It was a challenge to which Dahl responded with sangfroid and clearheadedness. Several days later, he wrote the whole experience down on paper in one of his Ideas Books. He did this neither for the lawyers nor for an insurance claim, but for himself. It was a private affair, the reflex action of a writer, an observer, who needed to record every detail of the trauma. This was the flip side of the hyperbolic fantasist. Now the analytical eye of the reporter was at work.

It was the beginning of several weeks of horrible uncertainty for the family. Housed in an oxygen tent for two weeks, Theo underwent several operations to drain fluid from his head. The surgery was successful and the doctors became increasingly confident that he would pull through, but no one was sure how badly his brain had been damaged. As there were no serious internal injuries and his head wounds seemed to be healing, Theo came back home just before Christmas.

Then, a week later, something about his condition began to disturb his parents. He went quiet; he no longer smiled; his reactions seemed dull. Pat and Roald spent New Year’s Eve with their neighbour the psychiatrist Sonia Austrian and her husband, Jeffrey. It was they who realised what had happened. Fluid had built up in Theo’s cranial cavity and was pressing on his brain, causing him to go blind.

Dahl rushed the baby back to hospital. Ed Goodman recalled that when he examined him, his head felt “like a bag of marbles”. The pressure of the build up of fluid around the brain, he told Dahl, carried with it a severe risk not only of permanent blindness but also of retardation and even death. The doctors immediately extracted the liquid, and fitted a tube to drain any further fluid directly into the baby’s heart, where it could easily be reabsorbed.

Initially, they were doubtful that the child’s sight would return, but it did, and eventually Theo was declared fit enough to go home. No sooner had he got there however, than his sight began to deteriorate again. The shunt —the internal drainage tube into his heart — had blocked. Once more the surgeons operated. Once more Theo’s sight returned, though “much impaired”.

It was a pattern that would repeat itself. Theo would come home, appear to be doing fine, then go blind because the tube had blocked. He would be rushed back into hospital for surgery, often convulsing, leaving his parents to face once more his “huge, desolate, bewildered eyes” when he awoke in the emergency room. Six times in the next nine months, the same thing happened. Every time, there was a chance that Theo’s sight would not return, that his brain damage would be worse.

Dahl was not one to sit back and let things take their course. As soon as he realised that the defective valve was the problem, he abandoned his writing and began to work out how he might improve the situation. He swiftly became something of an expert. With typical resourcefulness, he contacted a man with whom he had first corresponded in 1950, when he’d wanted to buy a miniature steam engine as a present for his nephew Nicholas.

Stanley Wade was no ordinary toymaker. He was a craftsman, a self-effacing perfectionist. His speciality was making model aeroplane engines and, in particular, the tiny hydraulic pumps that supplied them with fuel. These never blocked. When Dahl explained his son’s problem and asked Wade if he could build something to the specifications Theo required, Wade told him he thought he could. By this time, too, Dahl had found a kindred spirit in a pioneering paediatric neurosurgeon called Kenneth Till who worked at London’s premier hospital for sick children in Great Ormond Street and would become Theo’s consultant.

Dahl struggled to keep writing that summer. He and Pat had arranged a rudimentary communication system between the house and his writing hut, with a switch in the main house and a flashing light bulb in the hut. One flash was a minor disturbance; two flashes an emergency. The light often flashed twice.

Within a year, the Dahl-Wade-Till (DWT) valve was ready. “No more than two centimetres long with six tiny moving steel parts inside it”. Till fitted it for the first time on a one-year-old child in May 1962. And it worked perfectly. It was a massive improvement on what had existed previously, and had been realised almost entirely by Dahl’s practical initiative and his refusal to accept the status quo. Although not ready in time for Theo, who was already well on his way to recovery, the valve was used successfully on almost 3,000 children around the world.

It was partly this fascination with invention that drew Dahl to the medical world. In Going Solo (1986), the second part of his autobiography, he would write that all his life he had taken “an intense and inquisitive interest in every form of medicine”, and he often described himself as “a frustrated doctor”.

Being a medical expert was one of what Dahl called his “dreams of glory”: childlike insomniac fantasies about the brilliant amateur who rises to the needs of the occasion and outdoes the great professional. He had huge respect for doctors and particularly for those who pioneered new treatments. But he was also not above teasing them. In George’s Marvellous Medicine (1981), a young boy devises a complex potion to cure his cantankerous old grandmother of all her illnesses. The “medicine” is concocted from a crazy mixture of household items, including gloss paint, shaving cream, engine oil, antifreeze, shoe polish and flea powder. Dahl dedicated the book to “doctors everywhere”.

Alongside this scientific streak went another, more illogical, which had its roots in the psychic leanings of his mother. The pragmatic rationalist also had a powerful sense of fatalism and destiny. He told his Manhattan neighbour that he was convinced the city of New York was in some way to blame for Theo’s accident. Pat, by contrast, was desperate to ascribe human blame and sometimes felt a “sickening clutch of hate” towards her nanny. She was haunted by not knowing exactly what had happened on that corner, and remained uncertain that Susan was not in some way responsible. Roald, on the other hand, seems not to have worried about this. He told Pat it would be both cruel and pointless to fire Susan. He took no legal action.Instead, he told his daughter Tessa that he believed a painting of a peacock he had recently purchased was probably responsible. He thought the bird was unlucky. It represented a city whose attractions had now finally withered and from which he longed to escape.

In May 1961, the Dahls returned to Gipsy House, their home in Great Missenden, Buckinghamshire. Looking after Theo, whose walking skills improved fast and whose mind seemed surprisingly undamaged by his trauma, brought Pat and Roald closer together, and she told a journalist that she no longer constantly challenged him or wished to “have nice fights and make it up in bed”. Theo had become a “centring force”, assisting the family to settle down more permanently in England. Surrounded by three children and Roald, on whose face wrinkles were starting to appear, and whose hair was now thinning rapidly, Pat would later describe the two years after Theo’s accident as one of the most beautiful periods of her life.

But tragedy was about to strike again. Throughout 1962, life had seemed to be settling into the kind of familiar pattern Dahl had long desired. Pat was away for 11 weeks shooting Hud with Paul Newman, but he was blissfully content to stay at home, writing, gardening and taking the children to and from school when required. He continued revising Charlie’s Chocolate Boy (the manuscript that would eventually become Charlie and the Chocolate Factory) and even started a new children’s book.

Then, one day in November, seven-year-old Olivia returned home from school with a note from the headmistress, notifying all parents that there was an outbreak of measles. Pat and Roald were concerned largely for Theo, because he was still vulnerable to infection. There was no generic measles vaccination available then – the first was licensed in the US in 1963.

However, Dahl knew that gamma globulin could be used to boost children’s immunity against the disease and that, although uncommon in England, in America it was a fairly routine prophylactic. Pat called her brother-in-law Ashley Miles to see if he could help. Miles agreed to send some. But he only provided enough for Theo. “Let the girls get measles,” he told her, “it will be good for them.”

Three days later, Olivia was covered in spots. Roald and Pat separated her from her siblings and let the disease take its course. After a couple of days of mild fever, all seemed to be progressing normally. When she awoke on the third day, her temperature had come down and she was sufficiently alert for Roald to teach her how to play chess. She beat him immediately. After eating a good lunch, she went to sleep again at 5pm and did not wake until late the following morning.

Only now she did not want to play games, complaining instead that she had a headache. Roald did his best to distract her. He tried to persuade her to make a monkey out of coloured pipe cleaners. But she was not interested. He noticed also that her fingers, usually so dexterous, were fumbling and imprecise. All she seemed to want to do was sleep. Roald and Pat called their GP, Mervyn Brigstock, who came over in the afternoon. He examined Olivia carefully and, although he agreed that she was strangely lethargic, found nothing wrong. He left half an hour later.

Roald returned to his hut. It was about four o’clock. Soon afterwards, Roald’s sister Else dropped around to see how her god-daughter was faring. She looked in on Olivia, who seemed sound asleep. At 5pm, Pat went back into Olivia’s bedroom and discovered her daughter having convulsions. She stared at her mother with “dead-looking eyes”, then suddenly became quite still, “her mouth gaping limply, oozing spit”.

Pat ran to the switch that connected Roald’s writing hut to the main house and hit it desperately. Four quick flashes brought Roald running. Immediately, he called Dr Brigstock. While they waited for him to arrive, Pat and Roald cooled Olivia’s forehead with cold flannels. But she did not respond. Soon she was unconscious. As soon as Brigstock saw her, he summoned an ambulance. Olivia’s breathing was now shallow and irregular and she needed oxygen.

Roald wrapped his limp daughter in an eiderdown and carried her out to the ambulance, which rushed her to nearby Stoke Mandeville Hospital. Roald followed behind in his car.

He subsequently noted what then happened:

Awful drive. Lorries kept holding us up on narrow roads. Got to hospital. Ambulance went to wrong entrance. Backed out. Arrived. Young doctor in charge. Mervyn and he gave her 3mg sodium amatol. I sat in hall. Smoked. Felt frozen. A small single bar electric fire on wall. An old man in next room. Woman doctor went to phone. She was trying urgently to locate another doctor. He arrived. I went in. Olivia lying quietly. Still unconscious. She has an even chance, doctor said. They had tapped her spine. Not meningitis. It’s encephalitis. Mervyn left in my car. I stayed. Pat arrived and went in to see Olivia. Kissed her. Spoke to her. Still unconscious. I went in. I said, “Olivia… Olivia.” She raised her head slightly off pillow. Sister said don’t. I went out. We drank whiskey. I told doctor to consult experts. Call anyone. He called a man in Oxford. I listened. Instructions were given. Not much could be done. I first said I would stay on. Then I said I’d go back with Pat. Went. Arrived home. Called Philip Evans. He called hospital. Called me back. “Shall I come?” “Yes please.” I said I’d tell hospital he was coming. I called. Doc thought I was Evans. He said I’m afraid she’s worse. I got in the car. Got to hospital. Walked in. Two doctors advanced on me from waiting room. How is she? I’m afraid it’s too late. I went into her room. Sheet was over her. Doctor said to nurse go out. Leave him alone. I kissed her. She was warm. I went out. “She is warm.” I said to doctors in hall, “Why is she so warm?” “Of course,” he said. I left.

No one knows exactly when Dahl wrote this distressingly cool and clinical account of how his daughter died. The meticulous description of her final day, of which this is the conclusion, was written in note form, in a green school exercise book, on whose cover, in capitals, was written one word: Olivia. He kept it at the back of a particularly obscure drawer in his hut and told no one about it.

His family only discovered it after his own death, 28 years later. Its focus on detail suggests that, like the notes he made after Theo’s accident, these series of snapshots were written soon after the event, when the disaster was all still bitterly fresh in his mind. Perhaps it was just the reflex response of the habitual writer. Possibly it was a kind of improvised therapy, an attempt to deal with the fact that his daughter’s death had robbed him of the sense of forward momentum he had always previously been able to generate in a time of crisis.

It may simply have been an agonising aide-mémoire that helped ensure that the emotional wound of losing his daughter would never entirely heal. The ugly details of her sudden death, which the soothing analgesic of memory might with time have blurred and fuzzed, would now lurk there forever in a secret corner. One glance alone would be sufficient to re-evoke the immediate intensity of those emotions of loss.

Olivia’s death was quite different from Theo’s accident. Theo had required his father’s active care and attention. With Olivia there was nothing he could do to affect the outcome. She was gone and he could not bring her back. Her death left him “limp with despair”. And fast behind the sense of loss was a feeling of guilt that somehow he had let his “favourite child” down. “I wish we’d had a chance to fight for her,” he said a few days after her death. The uncertain sense that somehow he had failed as the family protector and had not done enough to shield his daughter from the cruelty of the world would haunt him for years.

Pat was waiting for him when he returned home. She already knew the worst. The doctors at the hospital had called her to break the news. Roald hugged her desperately, his “heavy sobs” spilling onto her shoulder. She knew already he was “destroyed”. The paediatrician Dr Evans, who had arrived at the hospital after Olivia died, came early the next morning to Gipsy House and told them that she had been the victim of measles encephalitis, a rare inflammation of the brain which can arise from measles, and which affects one in a thousand cases.

He confirmed that large doses of gamma globulin could well have prevented her from getting the disease. Thus, Pat remembered, began the “landslide of anger and frustration” that almost buried the family. Whereas Pat was able to cry and talk to others about her lost child, Roald kept himself to himself and seemed incapable of acknowledging his wife’s suffering. He rapidly put all Olivia’s toys and books into a polished oak chest, which he kept in his bedroom. He made Tessa feel that she could never make up for Olivia’s loss. He was silent. Pat found him increasingly distant. “He did not talk about his feelings… did not want to talk about Olivia… he wouldn’t let anything come out, nothing.”

Three years later, in February 1965, Pat had won an Oscar for her role in Hud and was three months pregnant with the couple’s fourth daughter, Lucy (their third, Ophelia, had been born the year before). She was starring in John Ford’s last movie Seven Women and the entire Dahl family had accompanied her to Los Angeles. At home after an exhausting fourth day of filming, a searing pain shot through her head. “Mummy, what’s wrong?” Tessa cried, as Sheena, the children’s new nanny, helped her mother stagger into the bedroom. Roald, who was coming up the stairs with Pat’s drink, found her sitting on the bed. “I’ve got the most awful pain right here,” she told him, pressing her hand to her left temple. She told Roald she was seeing double and experiencing what her medical notes later described as “bizarre fantasies” and “peculiar thoughts”. Suddenly her head jerked back and she lost consciousness.

Dahl suspected at once that she was having a stroke. He rushed into his study and called one of LA’s top neurosurgeons, Charles Carton, who dispatched an ambulance. Dahl returned to the bedroom to find his wife just conscious. She was covered in vomit and could not recognise her own children. Tessa was staring at her with a look of “utter desolation”. Five minutes later, sirens wailed. “What’s that sound?” Theo asked. Sheena told him it was a cat. Tessa, perhaps remembering the night Olivia died, knew exactly what it was. “It’s an ambulance coming for Mummy,” she said.

The operation began at midnight and lasted until after 7am the following morning. The surgery revealed that the rupture had been caused by an aneurysm, a genetic weakness in the wall of the artery. Perhaps pregnancy and the stress of a tough day’s shooting caused it to burst at that particular moment, but it was a disaster that had simply been waiting to strike.

Pat remained in a coma for almost three weeks, lying on an ice mattress to minimise swelling and besieged by tubes. Antibiotics to prevent infection and anticonvulsants to prevent further damage to the brain dripped constantly into her system. Roald sat by her side for hour after hour, repeating endlessly, “Pat, this is Roald.”

For days there was no improvement in Pat’s condition. But on March 10, almost three weeks after the haemorrhage, Pat began to regain consciousness.

Roald was by her side when she falteringly opened an eye. It was the kind of crisis he was able to endure because it offered the opportunity to take control of the situation and also because he saw the chance of a positive outcome. The image of himself as the lone fighter, struggling against adversity to keep his family alive, was now profoundly ingrained in his psychology.

At first, Theo and Tessa were kept entirely away. A few days after Pat began to emerge from the coma, however, Roald decided that the children should see their mother. The experience was traumatic. Theo, aged four, was upset. And seven-year-old Tessa was terrified: a mixture of “horror, fear, nausea” welled up inside her as she contemplated “this hideous creature who cackled and moaned… this thing that was meant to be my mother… She had no hair, she had a black eye patch, she had lipstick smeared over a lopsided mouth.”

Dahl seized on the advice of Carton that immediate and intense stimulation offered perhaps the best hope for his wife’s recovery. He set her to work immediately, hiring speech therapists and physiotherapists to help her relearn the simplest things. Sympathy was not high on his list of priorities. Within days, his draconian plan seemed to be working. Pat’s mobility began to improve and doctors were startled at the speed with which she tried to put sentences together.

Miraculously, barely a week after she began to regain consciousness and a month after she had suffered the stroke, Pat was discharged from the hospital to convalesce. But as Pat struggled to put her thoughts into words, to teach herself the names of colours, to work out how to use her right arm and feed herself, she became overwhelmed by the awareness of exactly what she had lost. The fact that she was pregnant also made relearning how to walk particularly exhausting. Dahl later described his wife’s condition in stark terms: “If left alone, she would sit and stare into space and in half an hour a great black cloud of depression would envelop her mind. Unless I was prepared to have a bad-tempered desperately unhappy nitwit in the house, some very drastic action would have to be taken.”

Roald’s methods were Spartan. There was to be no self-pity, no indulgence toward the illness, just a determination to beat all the disabilities. His approach, Pat recalled, “was to get me to do it myself”.

Roald behaved like a general running a military campaign, demanding absolute adherence to his rules from everyone in the household. Pat’s friend Gloria Stern, who came to visit one afternoon, found him reminiscent both of a stage manager and a traffic cop. She admired his “fierce, unrelenting approach” but was disturbed because it also reminded her of “the way one trains a dog”.

Under pressure financially, Dahl moved his family back to their home in Great Missenden in May. He was devising a strategy for Pat’s rehabilitation based, as he saw it, on “common sense” and the avoidance of “inertia, boredom, frustration and depression” in the patient. He sent her for physiotherapy at a nearby RAF military hospital. Then each day, between nine and 12 in the morning and two and five in the afternoon, he arranged for friends and neighbours to visit. These amateur therapists, led by Val Eaton Griffith, read children’s books to her and played elementary word games. Some encouraged her to draw pictures, or laid out objects on a tray and got her to try to memorise them. Others stretched her mind with simple crosswords, jigsaw puzzles or arithmetic.

Despite all his efforts, it was gradually becoming clear to Dahl that the aneurysm had metamorphosed his wife into a different person from the one who had returned home from shooting in February. The match had never been ideal. It had started shakily but it had been galvanised by the arrival of their children and further strengthened by the twin disasters of Olivia’s death and Theo’s accident. These shared catastrophes had brought Roald and Pat closer together.

Now Pat had become the third of these calamities. Tessa felt that her mother had been transformed, with her eyepatch and her steel leg calliper, from a glamorous extrovert into a “terrible burden”. For Roald, his wife had ceased to be an equal; she had become a dependant and somewhat of a stranger.

On New Year’s Day 1966, Dahl publicly raised the stakes on his wife’s recovery, telling the press that he felt certain she would be “working again within the year”. As a result, movie offers slowly began to come in. Mike Nichols offered her the role of Mrs Robinson in The Graduate. Pat knew she was not ready for the part, which was eventually taken by her friend Anne Bancroft. Peter Sellers offered her a cameo in his movie What’s New Pussycat? She passed on that as well.

Finally, Edgar Lansbury offered her the lead in a film version of the Tony Award–winning play The Subject Was Roses by Frank Gilroy. Pat liked the part of Nettie, a tough working-class New York mother, whose son (played by Martin Sheen) returns home from the Second World War to discover that his parents’ marriage is failing.

The role was gritty, raw and it suited her mood. It had two other attractions: it was not to be shot until 1968 and the filming would be largely in her beloved New York. Her therapist Val Eaton Griffith convinced her to accept it.

Yet Pat remained anxious that she was not ready. Val, however, had already persuaded her to deliver a speech in New York in March 1967. Roald had written the text of her address and Val coached Pat on it daily for a month, before accompanying her to New York for the celebrity dinner.

“An Evening with Patricia Neal” was a fund-raiser for brain-injured children held at the Waldorf-Astoria. Its starry guest list included Leonard Bernstein, Joan Crawford, Yul Brynner, Rock Hudson, Paul Newman, Alistair Cooke, Mel Brooks and Anne Bancroft, and it was Pat’s first public appearance since the stroke. Her speech won her a standing ovation. The adulation stimulated her desire to recover and she began to believe she might pull off the movie comeback.

That night she saluted her husband for what he had done to force her back into the limelight. Later, she would articulate her gratitude more eloquently: “I knew at that moment that Roald the slave driver, Roald the b-----d, with his relentless courage, Roald the Rotten, as I had called him more than once, had thrown me back into the deep water. Where I belonged.”

This is an edited extract from Storyteller: The Life of Roald Dahl, by Donald Sturrock, to be published by Harper Collins on September 2.

Buy Storyteller: The Life of Roald Dahl from Telegraph Books