CAITLIN DAVIES grew up a mile from Holloway Prison, the largest and most famous jail for women in western Europe. As a six-year-old, she recalls being enchanted by the magical, almost medieval castle jail with its high turrets and Gothic battlements. “To my childish eyes all that was missing were a moat and a drawbridge, Rapunzel at a window letting down her hair.”

Clearly, London-born Davies, was an imaginative and curious child, the eldest of three children of award-winning novelist and biographer Margaret Forster, who died of cancer two years ago aged 77, and prolific journalist and author Hunter Davies.

She is the author of 11 books and her latest, Bad Girls: A History of Rebels and Renegades, is a rich, superbly researched, definitive history of Holloway Prison, which closed in 2016, and of the many disobedient, defiant, dangerous women and girls incarcerated there.

Davies, 54, remembers seeing the prison being knocked down – the 1852 buildings were demolished and rebuilt in 1970 – and some girls’ parents telling them if they were bad they would end up there. We meet at her north London home, which she shares with her newspaper photographer partner, Nigel, and her 18-year-old daughter, Ruby, from whose African father Davies is divorced. Her house is a 15-minute walk from the prison. “I’ve ended up where I began, even closer to Holloway.”

In 1990, she entered the jail -- not as an inmate, I hasten to add -- as part of her teacher training. She had asked to do her placement there because she “had the curiosity that came with privilege” and because prison frightened her. “People kept asking me why. The image was that it was full of ‘scary dykes’ who would beat me up. It was nothing like that at all, although I am still really, really scared of prison, terrified of it. Being held in solitary confinement would drive me insane. No free will, no choice...”

So who were those Holloway “bad girls”? They range from socialites to suffragettes and spies, from refugees to freedom fighters and conscientious objectors, from Wendy Wood, a patriot from Scotland, to the Dowager Duchess of Sutherland and Zoe Progl, “queen of the underworld,” the only woman ever to escape from the jail that once housed Emmeline Pankhurst, the fascist Diana Mitford, Ruth Ellis, the Greenham Common women and Myra Hindley.

And what were the bad girls’ crimes? Treason and murder, begging, performing abortions, stealing clothing coupons, masquerading as men, attempting suicide... a sad litany of crime and punishment. There are many heartbreaking stories within stories within stories in the book, which was a quarter of a million words long when she finished her first draft. “I have written ten books! Five novels, five non-fiction books! How did I not notice that it was so long? I had become totally immersed -- so there are another 150,000 words that are not in there,” she reveals.

“I still worry about the women I had to leave out, such as Helen Duncan, the spiritualist medium from Perthshire imprisoned in the Second World War under the Witchcraft Act, or Christine Keeler and Mandy Rice-Davies jailed during the Profumo Affair in the 1960s. I have sleepless nights over the missing women, although I tried to focus on less well-known women, which was hard because they tended not to be interviewed or to write about their experiences.”

She conducted some 60 interviews for the book, many with prison staff and former governors. “I had to win their trust,” she explains, adding that one man would not speak to her until he had read every book she has written. Which includes her fine 2011 novel The Ghost of Lily Painter, partly based on a true story about two Edwardian baby farmers, who murdered the babies whose unmarried mothers were paying to mind them, and who were hanged at Holloway.

Working on her impressive book, which Jeremy Corbin has praised as “insightful, thought-provoking... a ripping good read,” helped Davies cope with her profound grief after the death of her remarkable mother. “It got me out of bed in the mornings, otherwise I’d have just buried my head under the blankets,” she confesses. Bad Girls is dedicated “To Mum”. It had to be “simple, nothing soppy,” because Forster, with her rigorous intellect, was the least sentimental of writers. “She kept telling me, ‘It is a great idea, a great story,’ but -- typical Mum -- when she was in the hospice I gave her the proposal and she read it and said, ‘It’s very

over-complicated’.

“So typical! She would never go, ‘That’s nice, dear, lovely, well done’. She was always critical -- I do it with Ruby! -- but if Mum was positive about something then you knew she was not lying. In any case, she was right about the proposal.” Davies does not believe there is “a writing gene”, however. Her mother certainly didn’t since she grew up on a working-class family on a council estate in Carlisle in a home where there were no books. “If there is a gene, how do you explain the fact that my brother, Jake, is a barrister and my sister Flora, a designer? We grew up surrounded by books with parents who were always writing because they loved it.”

It has been a struggle to write Bad Girls, Davies sighs. “I had such a battle to get access to the archives -- that took about 18 months. I hit many brick walls but I’m so glad I kept going. When I finally got permission, I was told I could come in and see them but I had to archive the archive in return and give extra lessons in the education centre. Of course I agreed. As a journalist, I was so proud because no other writer was ever going to spend six months in there researching as I did. Then there was the problem of finding a publisher. I was told by one publishing house that it was ‘too niche’ because it is about women and prison.”

Eventually, though, three publishing houses wanted it – “Proof that persistence and bullishness pays off!”

Davies is indeed persistent. “I’m a pushy person,” she admits. While a student at American University, Washington DC, she met a young man from Botswana called Ron. After qualifying as a teacher, she moved to his country to work as a teacher but became a campaigning journalist. They married and Ruby was born there. Meanwhile, Davies was arrested twice and put on trial for her fearless reporting on the activities of a street gang in the delta village of Maun, then for a news report on a woman who was on death row for killing her husband -- for the first time in Botswana’s history her lawyers were arguing battered woman syndrome.

“Yes, I faced prison but that is not the same thing as being imprisoned. Nevertheless, the threat was there; it was also about how quickly life can change. The police walked into my office on International Human Rights Day and said, ‘You are under arrest’. It was under some mad colonial law that no one had ever been accused under before. In the second case, my source was sent to prison so I was close, very close.”

When her marriage broke down, Davies came home and wrote A Place of Reeds, a memoir that Hilary Mantel has described as “candid and unsentimental,” acknowledging Davies’s bravery since the book’s chilling finale tells how, after working with a group founded to help and counsel rape victims and estimating that a woman was raped in Botswana every 12 minutes, she became one of her own statistics.

We don’t discuss that book today -- we did so in 2005 at the Edinburgh International Book Festival when Davies spoke with courage and dignity about her ordeal -- because she has already told that story. Today she has other stories to tell. In the summer she publishes a new novel, Daisy Belle, inspired by the career of Agnes Beckwith, a Victorian swimmer, once world famous but now long forgotten. It is a story of courage and survival, a theme that runs through much of Davies’s work. Next up is a history of female criminals, such as Zoe Progl. “She was not a victim, she chose the criminal life and revelled in it. I’ll start in the 1600s with Moll Cutpurse and do 400 years of women who were criminal aristocracy, celebrities whose stories have been buried.”

Meanwhile, the future of the Holloway site is still being debated. It will eventually house flats and there is a vociferous campaign for a permanent women’s centre in recognition of the 300 suffragettes confined there.

There is also considerable film and TV interest in Bad Girls. “I’ve had meetings with people who want to make documentaries as well as dramas based on it. Fingers crossed. I’ve never had a book optioned before so it would be fantastic after all those endless rejections. I just have to carry on being my pushy self!”

Bad Girls: A History of Rebels and Renegades by Caitlin Davies (John Murray, £20)