The women were considered a public health risk
At least 43 female typhoid carriers were locked up for life in a mental hospital, the BBC has learned.
The women were held at Long Grove asylum in Epsom, Surrey, in the period between 1907 and its closure in 1992.
They had recovered from the disease but still excreted the bacterium and posed a public health risk.
Nursing staff told a BBC investigation that some of the women may have been sane when they were admitted but went mad because of their incarceration.
Most of the records from the hospital were destroyed after it shut down.
But historians working at the Surrey History Centre in Woking discovered two volumes of records in the ruins of Long Grove.
All of the women came from the London area and between 1944 and 1957 three new carriers entered the unit each year.
Former nurses have told the BBC how the asylum was run like a prison.
Even after the advent of antibiotic treatments in the 1950s, the women were detained in the hospital because of the state of their mental health.
Jeanie Kennett, a ward manager who worked at Long Grove for 40 years, said it was a "basic existence" for the patients.
"They're somebody's loved ones, they're somebody's mother, or sister, everybody had forgotten about them - they were just locked away," she said.
"Life was pretty tough; they were seen as objects, it was prison-like - everything was lock and key."
Former ward sister May Heffernan said members of staff refused to go inside the isolation ward and were made to scrub up carefully to prevent infection.
She said: "When you entered the building, the first thing you did was put on a surgical gown, we also at times wore masks.
"And when you flushed the toilet it was actually boiling water that flushed the toilets."
Hugh Pennington, emeritus professor of bacteriology at Aberdeen University, said the women would have posed only a small risk to the public.
"They certainly were infectious; they had the potential to spread the infection to others if they had poor hygiene and they were preparing food and all that type of thing", he said.
"But as a public health risk, I think they were basically targeted and there was a lot of over-exaggeration about the threat they posed."
He added: "In fact most of the problems with typhoid were to do with bad water supplies and such like and typhoid getting into milk and things like that, rather than the odd typhoid carrier going around."
The Department of Health told the BBC that there is not, and never has been, "a policy of incarcerating" anyone, in this context.
BBC's Newsnight will report on Angus Stickler's story. You can watch Newsnight on BBC Two at 2230 BST.