It was a particularly hot summer in 16th-century Strasbourg, an imperial metropolis of the Holy Roman Empire that now serves as a lovely French border town. A series of failed harvests had led to skyrocketing bread prices, and syphilis had just joined leprosy and the plague as the latest indiscriminate killer. In short, it wasn’t the happiest of times. And then a lady known as Frau Troffea started dancing spontaneously in the streets and wouldn’t stop. Within weeks, scores of others had joined her, dancing for hours every day for weeks in what became known as the Dancing Plague of 1518. The craze even managed to claim the lives of several townspeople who danced until they dropped.

But Strasbourg wasn’t alone; several other dancing plagues afflicted Europe in the Middle Ages. Their causes are uncertain, though many put it down to mass psychogenic illness (MPI), a bizarre and poorly understood psychological phenomenon whereby certain physical symptoms — from dancing to hiccups to fainting — spread rapidly among an otherwise healthy population for psychological reasons, often during times of extreme stress. In many separate cases in medieval Europe, for example, groups of nuns would uncontrollably meow like cats and scratch at the bases of trees for days at a time. In Salem, Massachusetts, an outbreak of MPI among adolescent girls in 1692 is credited with provoking the witch trials. And in parts of Southeast Asia, periodic outbreaks of an illness known as koro involve the overwhelming belief that one’s genitals are shrinking into their body — men have been known to drive pegs through their penises to prevent a complete retraction.

Though some modern psychiatrists question whether the dancing plagues were indeed cases of MPI or merely mass ecstatic religious rituals like speaking in tongues, for science historian John Waller, the diagnosis is clear: Doctors, theologians and Strasbourg city officials sought a cure for the out-of-control plague because “the people who were suffering from this dancing malady believed that they had been cursed.”

Doctors initially suggested that the afflicted simply “dance off” the malady — the city even hired musicians and dance partners to “help” the sick.

Though these events seem fanciful, “there’s a context” to each outbreak that’s important to understand, says medical sociologist Robert Bartholomew. “Nuns don’t just start meowing out of nowhere.” Cats were strongly associated with the devil, and in Strasbourg, there was a belief that Saint Vitus could curse people to dance as a punishment for sinful behavior. This form of MPI, also known as mass motor hysteria, strikes when collective stress reactions manifest themselves as a trancelike state. What happens in this “altered state of consciousness is colored by the cultural context,” says Bartholomew. In strictly religious societies, this is often interpreted as devil possession. Hence, meowing nuns in the Middle Ages and, since the release of The Exorcist, possession-like MPI often involves speaking in a deep, gravelly voice.

These cases are now relatively rare in developed, secular societies but still occur in highly repressive environments where victims, usually females, have few outlets for stress, like in strict religious schools in Malaysia or garment factories in Bangladesh. A more common form of MPI is mass anxiety hysteria, says Kings College London professor Sir Simon Wessely, which involves contagious symptoms of fainting or nausea, often triggered by an odd but totally benign smell. A famous case in 1999 forced Coca-Cola to withdraw several million products from across Belgium after dozens of schoolchildren fell ill. The subconscious fear triggered in these cases is no longer devil possession but some form of environmental poisoning (after extensive tests, no toxic effects of the Coke products were found, simply a strange smell on the outside of the cans). In war zones, the fear of chemical attacks can trigger psychosomatic symptoms. In Afghanistan, for instance, dozens of girls’ schools have been plagued by symptoms implying poison attacks by the Taliban, but no evidence has ever been found by international authorities — and experts believe these to be cases of MPI.

But cases of motor hysteria seem to be on the rise again in Western societies, says Bartholomew, including the infamous 2011 case of twitching teenagers at a school in Le Roy, New York. There was also a 2012 hiccuping outbreak in two high schools in Massachusetts (coincidentally — or perhaps not — in the town formerly known as Salem Village, of witch trial fame). Explaining this recent uptick is made difficult by the reluctance of public health bodies to disclose the diagnosis of MPI, says Bartholomew, for fear that it might be misunderstood. The Massachusetts Department of Public Health (DPH) has still never publicly mentioned MPI as the likely explanation of the outbreak, which Bartholomew describes as “deliberately deceiving the public.” In response to OZY’s request for comment, a DPH spokesperson said that the only purpose of the official investigation “was to look for potential environmental factors, … not to provide a diagnosis”.

The publicity around contemporary cases (the Leroy case was featured on The Oprah Winfrey Show and attracted Erin Brockovich to investigate), combined with the effects of social media, might have increased the contagion of these epidemics, experts say. “I think there should be responsible reporting [guidelines],” says Wessely, like those for reporting suicides to prevent copycats.

Back in medieval Strasbourg, doctors initially suggested that the afflicted simply “dance off” the malady — the city even hired musicians and dance partners to “help” the sick on stages in the most public parts of the city. The publicity backfired then, as now, and only made the epidemic worse.