A mob of about 100 people in the central Mexican state of Hidalgo doused a detective with gasoline and burned him to death, according to local officials.

The Hidalgo state prosecutors’ office said the crowd attacked local police in the town of Metepec on Thursday and took the detective and three other men captive.

They severely beat the men and burned the detective after dousing him with fuel. It was unclear if he was on duty or if they knew he was a detective.

Video posted on social media sites showed a mob kicking one of the men in the town square and beating him with cudgels and fists. Police eventually arrived to rescue him and two others.

The mob was reportedly roused by rumors that the men were planning to abduct children.

The prosecutors’ office said it was investigating and would bring the killers and other members of the mob to justice.

“Let it be clear, inciting or promoting these kind of acts is also a crime,” the office said.

In similar cases, prosecutors have been able to identify and arrest suspects because townspeople often record attacks on their cellphones and post videos online.

There have been five killings in the span of about a month in Mexico based on false rumors about child snatchers. In four of those cases, the victims were also burned.

Authorities say the rumors circulate on social media and have asked the public not to believe them.

It is not the first time that investigative agents have been killed in Mexico after townspeople caught them snooping around.

In 2004, a mob on the southern outskirts of Mexico City beat two federal agents and burned them to death for allegedly taking pictures of schoolchildren. Some claimed they believed the agents were kidnappers, but it turned out that they were on assignment investigating a case.

The hysteria has also swept up people who were simply asking questions.

In late August, two men were set afire by an angry mob in Puebla after they apparently stopped to have beer near a school.

In 2015, residents of Ajalpan, Puebla beat to death two young men who were making inquiries in the town.

Rumors spread that they were trying to kidnap children, but the two men were actually conducting a commercial survey about tortilla consumption.