Author Sarah Wise was watching the play Gas Light when she came up with the idea for her book, Inconvenient People.
She was intrigued by the fact the audience immediately "got" the plot of a conniving husband trying to push his wife to the brink of insanity.
His tricks include dimming the gaslight outside their flat in foggy London to try to make her doubt her own perceptions.
The play, by Patrick Hamilton, dates back to 1938 but has been staged many times since then.
"It must be an archetypal fairy-tale sort of story," says Wise, who has written three books on Victorian England.
"I thought, I'm going to write a book about that."
It is now one of six books shortlisted for the Wellcome Book Prize, which celebrates the topics of health and medicine in literature.
She carried out detailed research, sifting through memoirs, letters, archives and local records to uncover 12 dark stories of men and women who had to fight for their liberty after being labelled insane.
Some were genuinely ill, others were eccentric, but all shared a common theme of being an "inconvenient person", who ended up in an asylum, often for the financial gain of friends or family.
"What they're really all about is a grab for finance," says Wise. "When someone's got wealth, where there's something to be gained that's really tangible, and if they're annoying and unpleasant, all the better."
The book has echoes of issues that persist today in mental health.
But people deemed mentally ill in Victorian England had very limited options for treatment, with those considered incurable given little therapy beyond being kept warm and fed.
Doctors treating the mentally ill were not called psychiatrists but were known as alienists, based on the belief that the self had become alienated from itself.
The term mad-doctor was also used irreverently.
Among others, the book tells the story of John Perceval, the son of a prime minister, who spent three years in an asylum.
His father, Spencer, was shot dead in the lobby of the House of Commons, which probably contributed to his mental breakdown.
Although John Perceval was treated in one of the most expensive hospitals of the time, he spent most of the day strapped on to a wooden chair alongside other patients.
After his recovery, he campaigned for reform of lunacy laws and published two books about his experiences.
Inconvenient People - Lunacy, Liberty and the Mad-doctors in Victorian England - is shortlisted for the Wellcome Book Prize.
The others are:
- The Signature of All Things, by Elizabeth Gilbert
- Wounded, by Emily Mayhew
- Creation, by Adam Rutherford
- Far from the Tree, by Andrew Solomon
- Hallucinations, by Oliver Sachs.
Follow Helen Briggs