Image copyright J. Paul Getty Museum Image caption Homer described how Mars and Venus were caught together to the "inextinguishable laughter" of the Gods (Joachim Anthonisz, J. Paul Getty Museum collection)

It sounds like a scene from a trashy sex comedy. But stories of getting stuck during sex have been with us for centuries - and some of them might just be true.

An emergency trip to hospital is never pleasant, but it's certainly not something you would want to happen after sex.

"It's not the most romantic ending a couple can imagine," says Dr Aristomenis Exadaktylos, author of a study of 11 years of admissions to his hospital in Bern, Switzerland.

He and his co-authors found plenty of patients who had experienced problems after sex - migraines, heart problems, even amnesia. But asked on the BBC's Health Check radio programme if he had come across a case of the woman's vagina clamping on to the man's penis, he said "No" - and added that the idea was probably an urban myth.

Two listeners, however, wrote in to dispute this.

Dangerous Sex About 0.1% of ER admissions to University Hospital Bern come about as a result of sex

Between 2000 and 2011 the hospital recorded 445 such cases

Of these, 308 cases (69%) were male

Most of the patients (78%) were younger than 40

A total of 276 (62%) had a possible infection

Fifty-five cases (12.4%) were neurological, including headache, amnesia and bleeding between the brain and skull

Two patients had cardiovascular emergencies and no penile fractures were recorded Source: "Sexual activity-related emergency department admissions: eleven years of experience at a Swiss university hospital", Journal of Emergency Medicine

"I must tell you it is no myth," wrote one woman who asked to remain anonymous. "It happened to my late husband and myself one night. He literally could not withdraw i.e. was 'stuck'. I attributed it to the intensity of the vaginal muscle response during orgasm."

Another correspondent, who asked to be referred to simply as John, grew up near an airport in southern England. "I remember hearing a story when I was 14 or 15 about an American airman who got stuck inside a lady and they had to get an ambulance and get them to a hospital to get them parted," he says. John eventually joined the merchant navy and started an on-off relationship with a woman in Japan.

On one occasion he and his partner were having "very enjoyable sex" when he suddenly found that he couldn't withdraw. "Proceedings came to a halt and we decided that we'd better separate," he recalls. It took two or three minutes of fumbling and laughing - the experience wasn't painful for either of them.

John, who is now 75, has never before spoken about the incident and it was never repeated.

Dr John Dean, a senior UK-based sexual physician, says that both accounts are credible examples of a rare phenomenon that doctors sometimes call "penis captivus" (captive penis).

"When the penis is in the vagina it becomes increasingly engorged," he says, giving his hypothesis of what causes the problem.

"The muscles of the woman's pelvic floor contract rhythmically at orgasm. While those muscles contract the penis becomes stuck and further engorged."

Finally the vaginal muscles relax, the blood flows out of the penis and the man can withdraw.

Many dog-owners will have seen their pets getting stuck during copulation, which breeders refer to as a "tie". However, there are distinct anatomical reasons for this, according to Peggy Root, an expert in animal reproduction at the University of Minnesota. A dog's penis has a compartment which fills with blood after intercourse has begun, effectively locking the male in place.

Dr Dean says that several of his patients have discussed with him their experience of getting stuck over the years, more out of curiosity than because it was a major problem. He draws a distinction between penis captivus and the more common and serious condition of vaginismus, in which a woman's vaginal muscles contract involuntarily, preventing intercourse.

Two reviews of the history of penis captivus, published in 1935 and 1979, highlight the public's longstanding fascination with it.

In 1372, Geoffrey de La Tour-Landry related how a voluptuary named Pers Lenard "delt fleshely with a woman" on top of an altar of a church, and God "tyed hem faste togedre dat night". The following day the whole town saw the couple still entwined "fast like a dogge and biche togedre". Finally prayers were spoken and the couple's prolonged intercourse came to an end (although they were obliged to return to the church on three Sundays, strip naked and beat themselves in front of the congregation).

Image copyright Unknown Image caption Mars and Venus depicted by 16th Century artist Raphael Regius (Special Collections, University of Vermont)

Captivus features in several other medieval myths and stories, which F Kraupl Taylor, the author of the 1979 review, believes may bear "only a tenuous connection with the actual facts".

He is similarly sceptical about an account from 1931 about an event in Warsaw in the 1920s, which ended with a double suicide. This time, penis captivus afflicted lovers trysting in a garden after closing time, and the couple were only separated when the woman was put under anaesthetic. But the real tragedy came after journalists - "in their greed for sensational facts" - published the story. "The next day two revolver shots put an end to the mental sufferings of the two lovers," the story goes.

Cold water cure "When I was a student at Leyden there was a young Bridegroom in that Town that being overwanton with his Bride had so hamper'd himself in her Privities, that he could not draw his Yard forth, till Delmehorst the Physician unty'd the knot by casting cold Water on the Part." Isbrand van Diemerbroeck17th Century Dutch physician

In his 1908 book The Sexual Life of our Time, Iwan Bloch recounted another case of penis captivus following on from a furtive meeting, this time in a quiet corner of the docks in Bremen, Germany. The woman underwent an "involuntary spasm", the man - a dock labourer - became trapped, and a great crowd gathered to watch. Eventually the couple were carted off to a hospital, chloroform was administered to the woman and they were freed.

In a 1933 manual of gynaecology, the author Walter Stoeckel speculated that penis captivus only affected couples engaged in illicit sex, the fear of detection presumably contributing to the force of the woman's muscular spasm.

This opinion is no longer held by experts, but the narrative of a clandestine meeting followed by public humiliation continues. Recent media reports of penis captivus - in Kenya, Malawi, Zimbabwe and the Philippines - all concern adulterous couples.

Image copyright Unknown Image caption A YouTube video showed crowds gathering around a house in Nairobi, where a couple were reportedly experiencing captivus

The Kenyan incident in 2012 supposedly occurred after the cuckolded husband paid a visit to a witch doctor. It was reported that the couple regained their liberty after prayers - and after the cheating man promised to pay the husband 20,000 Kenyan shillings (£140). He was filmed going to an ATM to withdraw the money.

The Zimbabwean media reported last year that a woman was bringing a law case against her long-term boyfriend for putting "runyoka" on her - a fidelity spell that caused her to get stuck on her lover. As one report put it, she was demanding compensation from the jealous boyfriend "for humiliating her and trying to control how she should use her private part".

But there are several accounts of penis captivus taking place within a marriage, including two unsensational case studies from 19th Century German gynaecologists.

Perhaps the best verified example of the phenomenon also occurred during marriage. After the Kraupl Taylor review was published, the British Medical Journal received a letter from Dr Brendan Musgrave, recalling an incident in 1947, from his days as a house doctor at the Royal Isle of Wight County Hospital. "I can distinctly remember the ambulance drawing up and two young people, a honeymoon couple I believe, being carried on a single stretcher into the casualty department," he wrote. This account was corroborated by another doctor who had been on duty at the time.

Dr John Dean says that he can't explain this "very unusual" story, since people experiencing captivus generally have trouble disengaging for only a few seconds.

But he adds: "If you're in that position, that probably feels like an eternity."

Dr Aristomenis Exadaktylos and Dr John Dean spoke to Health Check on the BBC World Service. Listen to Dr Exadaktylos or or Dr Dean again on iPlayer, or get the Health Check Podcast.

Follow @BBCNewsMagazine on Twitter and on Facebook.