TRAUNSTEIN, Germany — The rumor began, as so many do these days, on Facebook.

A group of Muslim refugees in southern Germany, it was claimed, had dragged an 11-year-old girl to a pedestrian underpass and raped her. When the police denied the claim, it was said that politicians beholden to the European Union had ordered them to cover up the assault.

The rumor proved unfounded, but it provoked waves of fear and anger as it was pushed out across Germany by Facebook’s News Feed. Users worked one another up into fits, concluding that these dangerous refugees, and the duplicitous politicians who shielded them, would all have to be thrown out.

In most of the world, rumor-fueled meltdowns are taken as a fact of life, a product of Facebook’s propensity for stirring up people’s worst impulses.

But Andreas Guske, a trim, steely-eyed police inspector in the refugee-heavy Bavarian town of Traunstein where the rumor circulated, didn’t think his community could afford complacence. Attacks on refugees were already rising. And southern Germany is a front line in Europe’s battle over identity and immigration.