In the summer of 1518, in Strasbourg, France, a woman known as Frau Troffea suddenly began dancing in the middle of a street. Her mortified husband commanded her to stop, but she didn’t, or couldn’t, and within seven days, Frau Troffea was joined by 34 more villagers. By the end of the month, 400 townspeople were frenzied with dance, unable to stop even for sleep, and some of them died from stroke, heart attack, broken ribs, or literal exhaustion.

“The Dancing Plague” remains a medical mystery. Some believe the outbreak was caused by ergotism, a hallucinogenic illness that can result from eating moldy bread. Chorea, a disorder of the nervous system that presents much like epilepsy, is another possibility.

But historian John Waller, author of “A Time to Dance, a Time to Die: The Extraordinary Story of the Dancing Plague of 1518,” notes that city council records at the time support the phenomenon as something deliberately undertaken — that the “plague” was psychological rather than biological.

“These people were not just trembling, shaking or convulsing,” Waller has said. “Although they were entranced, their arms and legs were moving as if they were purposefully dancing.”

This past December, Lori Brownell posted her first video to YouTube. She titled it “Twitching/passing out-1st video!” Brownell, who is 16, has shoulder-length auburn hair and almond eyes rimmed in kohl eyeliner. On camera, Brownell details her recent history of passing out at homecoming, trouble sleeping, seizures, and the sudden, strange onset of Tourette’s-like twitching and vocal tics, which include chimp-like breathing sounds.

“This is not easy to control,” Brownell says. “When I do this” — and here her left arm and hand flutter around her face as her head bobs about — “there’s this weird feeling that goes up and down my spine. And if I try to stop twitching, then it just builds up and comes out much stronger, so I try not to do to that. I try to let it come out.” Brownell then bursts into tiny applause. “That’s another thing I do a lot, clap,” she says. “I also blink a lot.”

Brownell lives near Albany, a five-hour drive from the tiny upstate hamlet of Le Roy. Last fall, her softball team traveled to play against Le Roy Jr./Sr. HS, and since October, 19 people, mainly Le Roy residents, have reported the same disabling symptoms of Tourette’s syndrome.

Aside from one 36-year-old woman and one teen boy, all of the victims have been teen girls, and almost all of them attend Le Roy Jr./Sr. HS, which has a student body of less than 400. Compounding the oddity: Tourette’s syndrome affects only between .4 percent and 3.8 percent of children between the ages of 5 and 18, with boys affected more than girls by a ratio of 4 to 3 and with symptoms actually lessening throughout adolescence.

The cases reached critical mass in late October and November, according to Dr. Laszlo L. Mechtler, a neurologist at the famed DENT Neurologic Institute in nearby Buffalo. Along with his colleague Dr. Jennifer McVige, Mechtler has been treating 14 of the 19 victims.

“Our first patient came through in October, and our last new patient came in five days ago,” Mechtler said on Thursday. “In the last 10 days, we’ve seen four new cases.”

At first, the outbreak caused local panic: Rival schools refused to bus their teams to play against Le Roy, a town that makes the inhabitants of “Friday Night Lights” seem listless in their love for football. Some rival schools continue to play against Le Roy, such as the York basketball team, which won a recent game. After Michael Faulk, the York coach, yelled “1-2-3-Tourette’s!” instead of the traditional thank-you, “1-2-3-Le Roy!” at game’s end, he was fired.

But sometime in the last week or so, as cases continued to emerge, the story went global. It has mortified and electrified this town of less than 8,000 people; until now, Le Roy was most famous as the birthplace of Jell-O — there is a Jell-O Museum just off Main Street.

Now, Erin Brockovich — the environmental activist made famous by Julia Roberts’ portrayal of her — has inserted herself into the chaos, demanding that her own team of investigators be permitted to test the soil around the school. She and others have theorized that a 1970 chemical spill, caused by a train derailment three miles from the campus, could be causing the tics. The area, now desolate, was declared a Superfund site by the EPA in 1999, after a toxic plume arose from the contaminated soil.

The pressure brought to bear has resulted in public silence from town and school officials. In this informational vacuum, hysteria has spread; at a parent/teacher crisis meeting last weekend, parents reportedly went berserk, demanding to know what kind of testing was under way and why officials were skeptical of other possible medical causes, such as hydrofracking, or PANDAS (pediatric autoimmune neurological disorders associated with streptococcal infections), or reactions to Gardasil, the HPV vaccine.

School Superintendent Kim Cox hired an independent company, Leader Professional Services, to search for contaminants; they found no chemical causes. The EPA has agreed to test and remove barrels that were buried at the site of the 40-year-old train derailment, and so far, 79 of the 80 tested have come up clean.

The National Institute of Health, state health officials and the four neurologists who preceded Mechtler as the diagnosing physician have all concluded that what’s happening to the girls of Le Roy is what happened to the fevered victims of the Dancing Plague of 1518: A mass psychogenic illness (more commonly known as “mass hysteria”) brought on by conversion disorder — so named because the patient’s brain and body has converted acute psychological stress into a physical manifestation.

The phenomenon is not new. There have been the French meowing nuns of 1990, the Tanganyika laughing epidemic of 1962, the 1965 fainting outbreak among 85 girls at a school in Blackburn, England, the West Bank fainting epidemic of 1983, among countless others.

This is a diagnosis that can be either comforting — there is nothing wrong with the water, the air, the soil — or distressing. After all, what does is say about your community if nearly 20 girls are suffering from mass hysteria, which has, as triggers, stress and boredom?

The diagnosis of conversion disorder has opened a rift in Le Roy, with half the town convinced there is a cover-up by the school and the government, and the other half convinced the girls are faking it.

That they are too sick to go to school yet have traveled to Manhattan to be on the “Today” show has not engendered sympathy.

‘This is the No. 1 topic around here,” says Lori Steinbrenner, owner of the Personal Preferences hair salon on Main Street. “It’s starting to get old. It’s not making us look like the wonderful little village we are.”

One mother, who has a son at the school and asked not to be identified, says the fear of contagion has spread to other towns. “My sister went to Applebee’s in Henrietta, which is 30 minutes away,” she says. “And when the waiter heard she was from Le Roy, he picked up her silverware with a napkin.”

As national and international media has descended — Dr. Mechtler says that this past week alone, he was interviewed by three separate news crews from Japan — residents have dug in to their stances.

Distrust runs deep here, and it’s easy to see why: Outsiders are rare. Most people raised here never leave. The town is more than 96 percent white and Christian. Although Main Street is half the length of a New York City block, and half the storefronts are abandoned and the remaining in disrepair, there are churches across the street from churches that are four steps away from another church, about 15 in one square mile, all full to capacity on Sundays.

The average household income, according to the 2010 Census, is $39,690. There is no place for kids to hang out after school: no coffee shop, no mall, no movie theater or bowling alley or even a parking lot to get up to trouble in. The winters are bitterly cold and grim.

So it’s not that surprising that when Mechtler and McVige announced their diagnosis of conversion disorder that some of their patients, and their parents, were skeptical. Tourette’s, after all, is rare, so how would these girls suddenly pick it up?

Conversion disorders often start with a Patient Zero who herself has been exposed to someone actually suffering from a disorder. In Le Roy, as it happens, a girl who graduated last year did have Tourette’s. All it takes is one girl who’s vulnerable to conversion disorder for the symptoms to spread. Add YouTube and Facebook and the macabre narcissism that often accompanies illness, and you have a rapidly cycling feedback loop.

“To tell a patient that his symptoms are all in his mind is a very, very difficult thing to do,” Mechtler says. “Most doctors won’t even tell a patient he or she has conversion disorder” — instead, they order batteries of tests and medicate in the hopes of a placebo effect.

Mass psychogenic illness has been recorded as far back as the 7th century, with conversion disorder first identified by Hippocrates in 400 BC. (Hysteria literally means “wandering womb,” and the term has been discarded due to its pejorative connotations.)

Historically, MPI tends to affect young women more than men, and though there are theories — women internalize more and tend to mirror group behavior — the why is still a mystery. MPI breaks out in areas of deep conflict: Kosovo, Lebanon, the West Bank. In the US, 60 percent of cases over the last 30 years have broken out among adolescent girls in rural schools (the other 40 percent among women in factories).

Today, the neurologic and psychiatric communities agree that conversion disorder in teen girls is brought on by emotional and psychological trauma, with sexual abuse typically the prime trigger.

Then there is the possibility that some of these girls are malingerers, deliberately faking their symptoms for money or attention.

On the former point, Dr. Mechtler is circumspect. “I have to be very cautious in what I say. These girls have gone to the media and said they have no stress. These girls would be in denial. They have had significant emotional and psychological issues above and beyond what teenage girls are normally subject to.”

Mechtler says the parents who remain the most vocal in the media about their girls’ ordeals have never come to a doctor’s visit. “The parents who’ve never come in are fathers who are estranged,” he says.

Still, the girls who are in his and McVige’s care are improving, in large part because the doctors made them pull down their Facebook pages and YouTube videos (Brownell is the most recent deposted), banned them from texting, and pulled them out of school due to bullying — not from other students, but from the four girls who are not in his care, who he believes may be malingerers.

“My patients are literally being terrorized,” he says. “They’ll say to the girls, ‘You never had it, and that’s why you’re getting better.’ ”

What will happen? Mass psychogenic illness tends to disappear as quickly as it surfaces, with modern treatments in line with Mechtler’s approach: removing the patient from the social stressors, treating them in isolation with medication and psychotherapy and slow reintegration.

As for the four girls bullying his patients, Mechtler reports that they have gone along with a diagnosis of PANDAS and are about to begin a course of antibiotics.

“You could give these girls anything,” Mechtler says, “and they would get better.”