Almost seven months after she was kidnapped from an island off the Kenyan coast, Judith Tebbutt stood in the bathroom of an opulent government building in Nairobi, wondering at her reflection. She had just been freed and was finally safe, but the woman in the glass was a stranger. Her weight had dropped to less than five stones (32kg), her veins protruded, and if she ran her hands across her middle, she could feel her internal organs. "There was no fat," she says, "just folds and folds of skin. I remember, vividly, looking and thinking: Who is that person? I could count my ribs. My breasts were flat, my stomach was just a fold, my hips were sticking out." When she tried to shower, she was left in tears. It was like being pelted with needles.

At dinner, she asked for a gin and tonic. When it arrived, she was too weak to lift the glass. Her hair had fallen out in clumps, and she didn't resemble a woman, she says. "I just looked like a skeleton with skin draped over her."That image of Tebbutt, thin and fragile, swept around the world on her release in March 2012, and I am slightly taken aback on meeting her now. Her hair is thick, shoulder-length, deep grey, and while she is still very slight – at 58, she has always been slim, and has struggled to regain all the weight she lost – she looks healthy and chic. She exudes the composure of someone capable, in even the most horrific circumstances, of holding on to hope and a carefully protected sense of self.

We talk in a light, airy room in the Faber & Faber building in central London. This is where Tebbutt's husband, David, worked as finance director, and the company has just published her gripping account of the kidnapping, A Long Walk Home. The couple had been together for more than three decades, and Judith only loses her composure when his name comes up, as it frequently does. At these moments, our conversation falls into deep breaths and pauses, as she swallows down tears.

David was born in Brixton, and in his 20s, having qualified as an accountant, he went to Zambia to work as a hospital administrator. Judith had grown up in Ulverston, Cumbria, and met her first husband, Peter, at the factory where she worked – it was an early marriage, made before the couple really knew each other, she says.

When her husband's job as an electrician took them to Zambia in 1976, her life veered off on another course. The first time she met David, "I just thought, wow," she says. "I knew nothing about him, but I knew that this was the guy I wanted to spend the rest of my life with." The feeling was mutual, her husband agreed to a divorce, and back in the UK in the late 1970s, the couple began building a life together. They married in 1985, and a year later had their only child, Ollie.

The family lived in Bishop's Stortford, Hertfordshire, and Judith describes David as the light of her life, talks of his warmth, capability, outdoorsiness and love of music. A parcel would arrive, containing some obscure CD – Mongolian throat singing, maybe – "and we would be subjected to this!" she says. "But he saw further than the music, really. He said: 'It's not just the music you listen to, but the people who are doing it, this way of communication.'"

They both had demanding jobs – Judith had become a social worker in a women's medium-secure psychiatric hospital – and they loved travelling, so booked a relaxing holiday for September 2011. It started with a week's safari in the Masai Mara, where they saw zebras, wildebeest and a cheetah with her spiky-haired cub. "David had such a brilliant time," she says, smiling. "He was thrilled. You could see it."

For the second week, they had arranged to stay at a family resort on the small island of Kiwayu, off the Kenyan coast, and around 40km from the Somali border. As they arrived, in a 10-seater plane, they were surrounded by colourful birds, but on disembarking, everything felt eerily quiet. "When we went into the restaurant area, there was no one around. There were no holiday sounds – the splashing of water, children playing." They were met by the manager, George, who told them they were lucky. No one else was arriving for at least a few days. David was relaxed, said this would be their Robinson Crusoe experience. Judith felt distinctly unnerved.

The banda at Kiwayu Safari Village, where David and Judith Tebbutt hoped to enjoy an idyllic break. Photograph: Rex Features

They had a few drinks, then made their way to their banda – a large, furnished tent, with no doors or windows – and went to sleep. Judith woke to see David standing at the far right-hand corner of the bed, his light turned on. "I just thought, 'What on Earth is he doing?'" she says, "because he was stood with his hands raised above his head." She didn't feel frightened immediately. Someone prodded her arm, and she saw two men with guns – one pointing at her. "I thought, 'Oh, it must be security! They're probably going to move us. Something must have happened.' That was just a millisecond, and then," she snaps her fingers, "a horrible fear took over." She was propelled violently off the bed, "and I just saw this look on David's face. He looked really frightened … I shouted: 'What's happening?' and he didn't look in my direction." She was dragged off, away from him, out of the banda, and across the sand.

What comes across strongly in the book is that Judith wasn't cowed by her captors. Kidnapped by a group of young men – she thinks some were just teenagers – she was determined to retain her identity. "I was desperately trying to understand what was happening, and also a part of me told me to be as awkward as you can. Don't make it easy for them. I was digging my heels into the sand, trying to make myself heavy, because if this was unexpected, they might have let me go and I would have run away."

A rifle butt was jabbed into her back, there were two hard slaps to her head, and she was pulled into the water, where she saw a fisherman's skiff approaching. She was forced on to the boat, and as they shot off into the sea, at a pace that led to an excruciating twist in her coccyx, one of her five initial captors made it clear she had been kidnapped for money. Another, the only one to speak English, told her they were heading for Somalia. Most of the men, she thinks, were Somali. They have often been referred to as pirates, but she dislikes the description, because it "conjures up this image of Johnny Depp and swashbuckling, and they weren't. They were criminals."

Over the course of a punishing few days, by land and sea, she was transported to a house in Somalia. Along the way, she thought of escape – either by grabbing a gun and killing them all, or creeping away while they slept, finding the nearest village, donning a burqa, and making her way to Mogadishu. She knew, honestly, both ideas were fantastical. Instead, they arrived at a gated compound and she was led to a room about 15ft square, with no windows. A sliver of light eked through the breezeblocks.

Ali Babitu Kololo (in green), one of the kidnappers under arrest in Kenya. Photograph: Murray Sanders/Associated News

She was covered in insect bites and scratches, was seriously worried about septicaemia, and decided she must look after herself and establish a routine. "That afternoon I was sat on this makeshift cot bed that they'd hammered together from bits of wood" – it was just big enough for a small child – "thinking: OK, what shall I do?" She and David had always been active, and so she decided to pace the room. "I found myself getting into it. I was calm, and I felt that was really important. I didn't want to be hysterical. And walking helped me organise my thoughts." She started counting her paces, "and I thought, 'Right, I'm going to do this every day.'" In the months before she became too weak, her exercise programme included a half-hour walk every waking hour, Pilates sessions and rotating an imaginary hula hoop.

Judith has four brothers and a sister, but had become used to her own company growing up, often heading into the countryside alone. She knew that being by herself in this particular situation, "wasn't a problem for me. It was what surrounded it that was the biggest problem."

Her breakfast, a few spoonfuls of rotten potato, was brought to her early each morning, and she was disciplined about when she ate it, waiting to remove the lid on the dish, always hopeful it might contain something different. An egg perhaps (she had heard cockerels nearby). It never did. At 9.30am precisely – 6.30am, British time – she would open it. This was "when Saz, Ollie's girlfriend, would be having her breakfast. So we breakfasted together. I visualised her getting up and having breakfast, and I used to say good morning to Ollie and Saz, good morning to Mum, and, later on, goodnight to them as well."

During her career as a social worker she had experienced perilous situations. On one occasion, she had visited a young man with a serious personality disorder, he pulled a knife on her, and she spent two hours talking him around. On another, a seriously unwell woman stabbed her repeatedly in the head with scissors. A large part of her work was spent trying to build a rapport with volatile people, clearly a useful skill in these circumstances.

Human interaction made captivity more tolerable, so she coaxed it out of her kidnappers where possible. They gave her bottled water each day, for instance, and she noticed that when she left the empty bottles outside, a criminal would grab them, and use them for tea. She started keeping them inside, so her captors would have to enter the room – a mild form of control, and a way to ensure she at least saw someone during the course of the horribly long days. She stuck to the decision not to be a pushover. "I challenged them all through my captivity, and bossed them about a bit as well." At one stage she was sharing a toilet with 20 men, and was unwilling to accept the squalor. Nothing could be done about the insects, but she told them to pick up their cigarette butts, and had a plastic bag put in the room to serve as a bin.

But at times she was a cowering wreck too. She was terribly ill more than once, and was devastated to eventually hear what had happened to David. In her first few weeks in captivity, she felt absolutely sure he was alive, he and Ollie working together in Nairobi towards her release. Then, a month in, she was allowed two snatched phone calls with Ollie in quick succession. In the second, he told her that David had been killed on the night of the abduction. He had wrestled one of the gunmen – there were marks on his arms where he had attempted to fight them off – and been shot in the chest, dying instantly.

The news tipped her into despair – she continued walking, but would find herself moaning, chanting, crying, a reaction that only brought out the worst in her kidnappers. She knew that if she wanted to survive, she would have to push the grief to one side, and began using psychotherapeutic techniques she had learned at work.

Judith Tebbutt on the outskirts of Adado town in central Somalia, on the day of her release on 21 March 2012. Photograph: Reuters

She didn't feel under threat of sexual assault, and most of the time was fairly confident that there was no intention to hurt her. "I felt that they saw me as this thing, that they were going to make money from. They had no real interest in me as a person, or as a woman. Not at all." She was a meal ticket, and if her captors endangered her life, they endangered their pay-out. But more than once they told her that no money was forthcoming, and she would be shot the next day. The first time this happened, "it was terrifying", she says, "and that was certainly one of the longest nights I spent there, just running through my life". The next day she was curious: is it going to happen? No one came, she was safe.

The second time they threatened to shoot her, she was suffering severe sleep deprivation and had a vivid vision of vultures picking over her corpse. I ask how she pulled herself out of this, and she says she was actually clawing the ground at the time, "and it was the pain in my fingers, they were burning. I looked at my hands, and that brought me out of it. And I deemed, from that point on, I was not going to let my mind go."

There were occasional moments of kindness in the compound. A woman called Amina, who cooked for the criminals, brought her samosas when she arrived – other than that, she just ate the rotten potatoes, and a small bowl of rice each evening. Amina also gave her a bottle of Sprite on her birthday, and hugged her before she left. But her captors often behaved in ways that left her incredulous. They just didn't seem to understand the enormity of what they had done. Towards the end of her captivity, the man who spoke English, Ali, brought in one of them, Gerwaine, and said: "'My friend here wants to know: do you think he's a bad man?' And I said: 'Well, personally, I don't know him as a man, but what he has done, and what you have all done, is very, very bad.'" The two men had a quick discussion, before Ali asked: "If Gerwaine came to London, would you say hello?" On the subject of David's murder, their attitude was simply, "'No problem, you get another husband.' They could not understand that some people marry for love."

Tebbutt is escorted to a plane at Adado airport after she was released on 21 March 2012. Photograph: STR/AFP/Getty Images

In March 2012, Ollie told her over the phone that she was being released, but she was still nervous as her captors drove her out of the compound; it was not until she finally arrived at an airstrip, and saw a pilot striding towards her, that she believed she was going home. "It was such a feeling of massive euphoria … as the plane flew away, you could still see these little dots of people, getting into their cars. I thought, 'I'm leaving all that behind.'"

Her release had been negotiated with the help of a private security firm, and she says that the amount finally paid is the subject of professional confidentiality agreements. The UK government's position is not to pay ransoms; Judith says she understands this, but knows, "for a fact that if Ollie had been taken prisoner, or hostage, I would do anything I could [to get him out], even if it meant me going to prison, even if it meant it was illegal … You don't want to be negotiating with these people. But there has to be another way. Bottom line, there has to be an alternative for these young kids, 17-, 18-year-olds, because this is easy money to them, even though they could be killed."

I ask how she feels towards her captors now. "Disdain, repulsion," she says, before adding that she also feels some sympathy. There's no industry where they're living, "they're brought up in complete poverty … I question myself: 'Why don't you hate them?' I absolutely hate what they did, and I would love there to be consequences for each one of them," especially the leaders and sponsors of the kidnapping. Attempts to bring the men to justice are still under way.

Her job was kept open, but she hasn't been able to go back; she can't be confident her nerves would hold, particularly since the patients know what happened to her, and could use it against her in vulnerable situations. Instead, she has been doing voluntary work, and is thinking about an Open University degree in criminology and psychology.

She misses David every day, hates being on her own, but knows he wouldn't want her to be miserable. On returning home, she says, "I kept expecting to feel like I used to feel, and waiting for that person to come back. That person is never going to come back, because part of that person was David. I was thinking about this the other day, and it must be similar to losing a limb. You have to learn to adapt without this other part that you relied on, depended on, that was part of you. So that Jude has gone, but there will be a life for me … I'm not letting those bloody horrible criminals win. They've taken David. They've taken enough."

She is hoping the book will help draw a line under the experience, psychologically, and act as a tribute both to David and to Ollie's work in negotiating her release. At one point in captivity, she says, she was given access to a radio, and listened to an interview on the BBC World Service. "There was this man who had been held in prison, who said: 'If you are sure that there's someone out in the world, fighting your corner, shining a light for you, that is everything. That's your home.' And I thought: That's Ollie. He's doing that. The man said, 'You just have to wait.' And that's what I had to do. I just had to wait."