Image copyright Dan Clarkson Image caption A "Ladies Only" sign on display at the National Railway Museum

Labour leadership contender Jeremy Corbyn says he would consult on introducing rail carriages exclusively for women. But "ladies-only" compartments were once a familiar sight in the UK.

Today India, Indonesia, Japan and Mexico all offer female travellers their own sections of trains. And there's now much discussion over whether the UK should consider it. But for more than a century, British women did have similar facilities.

In March 1977, The Times reported that British Rail was phasing out its remaining "ladies only" compartments. At the time around 100 still existed on services between London and Essex.

They operated from as far back as the 1840s, and by the 1850s South Eastern had a rule that a "carriage is always reserved for ladies if required".

In October 1874 they were introduced on London's Metropolitan Railway following a series of highly-publicised attacks on women travellers - according to York University railway historian David Turner, who has researched the subject.

Calls for the carriages grew after 49-year-old Col Valentine Baker was convicted of indecent assault on a 21-year-old woman on a service from Portsmouth to Waterloo in June 1875.

The victim was forced to flee through the compartment's only door, which opened externally, leaving her balancing on the running board outside the moving train and clutching the door handle until the train came to a halt.

"Women were travelling alone and they were worried about being attacked as they went through tunnels," says cultural historian Fern Riddell.

Image copyright Rex Features

Turner says the compartments were "rooted in the Victorian archetype of women being meek and submissive, who should know their place".

But much of the impetus for them came from women themselves, says Riddell. It was a period when women were commonly subjected to verbal and physical harassment in public places, she says, and, just as today, many demanded protection from it.

There were grumbles about the new sections from the outset, however. "Why will not ladies, especially when alone, travel in the carriage set apart as 'The Ladies' Carriage?'," wrote one correspondent to The Times on 25 June 1875, who complained that it was frequently empty while the rest of the train was full.

"A British Mother" replied in a letter to the editor that these compartments were "very frequently occupied by nurses and children" and that there was continuous "baby talk". She continued: "All ladies are not prepared to encounter the desagrements incident to the crying, feeding of children not their own."

Indeed, take-up was never as high as anticipated. "They were never that popular," says Bob Gwynne of the National Railway Museum.

During trials conducted in 1887, Great Western found that just 248 of 1,000 female-only seats were taken up, while more than 5,000 women used the smoking cars, says the NRM's Oliver Betts.

Newer trains were built with doors that opened on to internal corridors rather than out into the open air. Changing social attitudes, too, meant lone female travellers were less of a novelty.

But the "ladies only" compartments remained, generally denoted with green signs to distinguish them from smokers' sections, which were red.

During World War One, the Liverpool Echo reported (perhaps fancifully) that a student travelling to London in a women-only compartment had sat alongside two nuns. On the way, the young woman noticed that one of the sisters "disclosed a masculine wrist". The student informed the guard and when they reached their destination, the nuns "found themselves under arrest as dangerous German spies".

A 1936 Great Western Railway rulebook required guards to inform any unaccompanied women that the "ladies-only" compartments were available.

But women did not always take them up on the offer. In November of the same year, Transport Minister Leslie Hore-Belisha was asked in the Commons about them. "I am informed that there are carriages marked 'ladies only', but that the ladies prefer not to use them," he told the House.

By the 1960s they were a rarity, persisting mainly on suburban lines, and the replacement of compartments with open carriages rendered them impractical, says Gwynne.

But since then there have been calls for their reintroduction. In 1999 it was reported that ministers were planning to introduce women-only carriages on London Underground trains. Last year Transport Minister Claire Perry told the Conservative party conference she was open to the idea of bringing them back to the wider rail network to reduce sex attacks.

However, a report last year for the Department of Transport, by Middlesex University, said this would be a "retrograde step" that "could be thought of as insulting, patronising and shaming to both men and women".

Subscribe to the BBC News Magazine's email newsletter to get articles sent to your inbox.