Thousands of workers at a garment factory in Bangladesh stopped working and rioted earlier this week, demanding that a ghost be removed from their building. The problem began when a female worker said she felt sick and attributed her condition to "an attack by a ghost" inside a toilet in the women's washroom.

According to news reports, more than 3,000 frightened workers at a plant in the city of Gazipur protested, with dozens of them vandalizing the factory before police used tear gas to quell the riot. This bizarre situation is understandable when we consider the psychological, historical and cultural context of the events.

A history of hysterias

This is not the first time that workers in Southeast Asian garment factories have fallen ill with apparently mysterious and unexplainable health problems. Between June and September 2011, more than 1,000 workers in shoe and clothing factories in Cambodia reported feeling fatigued, dizzy and nauseated. After rest and medical attention, they recovered and went back to work; few, if any, reported lingering symptoms. No toxins or environmental contaminants were found that could have caused the symptoms. [The 8 Most Bizarre Medical Conditions]

Similar events have occurred in Bangladesh in recent weeks, with hundreds of workers in the capital of Dhaka and other factory towns complaining of feeling ill with minor symptoms and no apparent cause. Medical authorities concluded that most of these cases were due to mass hysteria, also known as mass sociogenic illness. Mass hysteria often begins when individuals under stress convert that stress into physical ills. Co-workers, family and friends may also begin exhibiting the symptoms through contagion. Outbreaks are most common in closed social units (such as schools, hospitals and workplaces) and where afflicted individuals are under pressure and routine stress. Fear and concern about factory working conditions is especially prominent in the Bangladeshi public's mind because of the April collapse of a garment factory building that killed more than 1,000 workers.

Story continues

Ghosts and mass hysterias

And what about the ghost in the toilet that sparked the riots? This case is unusual in that typically mass hysterias do not involve ghosts. However, both ghosts and hysterias often begin with unusual or (apparently) unexplained phenomena. It is only a small step from being concerned about a mysterious, undetectable health menace (perhaps a hidden gas leak or other potentially threatening toxic substance) to being concerned about a mysterious, unseen presence. The belief in ghosts is widespread among the largely Muslim Bangladeshi population, and it is not uncommon for accidents and illnesses to be blamed on evil spirits.

It's important to note that few, if any, of the thousands of factory workers claimed they personally encountered the ghost or had anything to do with it.And apparently, the woman herself didn't claim to actually see the ghost; instead, she said she felt sick and assumed that a ghost was responsible. Whereas American ghosts aren't typically thought of as spending a lot of time in the bathroom, in the Middle East and Asia, the idea of a ghost or spirit haunting a toilet is not uncommon. For example, genies and other spirits are said to dwell in many places, including toilets and sewers, and Japanese folklore tells of Hanako-san, a spirit that resides in women's bathrooms.

There is no real treatment for mass hysteria (other than attention from doctors or other authorities); the episodes tend to run their course and fade away almost as quickly as they started. Factories — full of textiles, chemicals, smells, stress and boredom — are ideal environments for the development of mass hysteria.

There is one significant difference between most cases of mass hysteria and this case: The Gazipurfactory workers (taking their cues from the sick woman) decided that they "know" what is to blame, and that explanation (no matter how fantastic) has a culturally clear and well-defined remedy: ritual exorcism.

With that in mind, the factory owners held special prayers at the site to remove the ghost. The factory was also shut down for several days to give everyone a chance to calm down; when the building reopens, it will likely be ghost-free — until the next time someone experiences something strange.

Benjamin Radford is deputy editor of "Skeptical Inquirer" science magazine and author of six books, including "The Martians Have Landed: A History of Media-Driven Panics and Hoaxes" and "Tracking the Chupacabra: The Vampire Beast in Fact, Fiction, and Folklore." His website is www.BenjaminRadford.com.

Follow us @livescience, Facebook & Google+. Original article on LiveScience.com.

Copyright 2013 LiveScience, a TechMediaNetwork company. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.