The Female Detective ... detail from the cover of The British Library's reissue

Literary ancestor to Miss Marple, Lisbeth Salander and Nancy Drew, the redoubtable Miss Gladden – the first ever female detective in British fiction – is set to make her reappearance after almost 150 years out of print.

The British Library is bringing Andrew Forrester's The Female Detective back into print tomorrow – the first trade edition of the novel to hit shelves since it was originally published in 1864. Narrated by Miss Gladden – who is often referred to as G – the novel sees the "original lady detective" visiting crime scenes incognito, tracking down killers and solving mysteries while she attempts to conceal her own identity from others.

Other authors did not start to use female detectives as characters until the turn of the century, said the British Library, but, as Miss Gladden points out, "criminals are both masculine and feminine – indeed, my experience tells me that when a woman becomes a criminal she is far worse than the average of her male companions, and therefore it follows that the necessary detectives should be of both sexes". Later, she says that "without going into particulars, the reader will comprehend that the woman detective has far greater opportunities than a man of intimate watching, and of keeping her eyes upon matters near which a man could not conveniently play the eavesdropper".

Lara Speicher, commissioning editor, said the novel was "very rare", with only a handful of copies listed in libraries around the world. "We felt that the first ever novel featuring a professional female detective deserved to be back in print and would be of great interest to readers. The narrator, 'Miss G', is the ancestor of such well-loved characters as Miss Marple, Mma Ramotswe and Helen Mirren in Prime Suspect," she said. Alexander McCall Smith, author of The No1 Ladies' Detective Agency series, writes in a foreword to the book that it "has a claim to be the beginning of a rich and continuing tradition in crime literature of the female detective".

Forrester was the pseudonym of James Redding Ware, author of a number of other detective stories. The author Mike Ashley, who wrote an introduction to The Female Detective, said it was "difficult to say" why Forrester chose to feature a female lead in the novel. "He does make it clear that he felt women had a better chance of winning the confidence of others and thereby securing more information," he told the Guardian. "In short women were probably trusted more than the male detectives. But remember that at this time there were no official female detectives in Britain, so the author was exploring new territory. The detective branch of Scotland Yard was only 20 years old."

Forrester, said Ashley, "may well have drawn upon real cases" in his novel, and "certainly in one case adapted the notorious Road murder of a young child which was resurrected recently by Kate Summerscale in The Suspicions of Mr Whicher, so there is a feeling of authenticity about them". And Miss Gladden, said Ashley, is "every bit as ingenious, determined and adaptable as her male counterparts, perhaps even more so. She's prepared to face men down even in the most difficult of circumstances, so in that sense may feel very modern, but she's nothing like the mild-mannered Miss Marple. She's more like Antonia Fraser's Jemima Shore."

Sign up for the Guardian Today

Our editors' picks for the day's top news and commentary delivered to your inbox each morning.