Nearly three dozen people have been arrested over the lynching of a young engineer and wounding of three men in India's south, over rumours they were child kidnappers.

The victims were allegedly traveling in a car through a village in Karnataka's Bidar district when a mob armed with sticks and stones attacked them Friday night.

The villagers were infuriated after the men tried to hand over some chocolates to village kids, police officer Chandrashekhar - who uses only one name - said.

The kids panicked, attracting local villagers who started beating them, the officer said.

The men gave them a slip but locals circulated images through WhatsApp to alert neighbouring villages that four child abductors were trying to escape, he said.

The officer said as the men reached another village, they hit a roadblock set up by the awaiting villagers and their car flipped.

The mob of some more than 2000 people attacked them, killing one and wounding the three others, he said.

As the assault continued, police tried to stop the mob, triggering clashes in which four police officers sustained injuries, Chandrashekhar said.

The slain man was a 32-year-old software engineer from the neighbouring state of Telangana and was visiting a friend with his cousins and a Qatari friend.

"My brother gave chocolates to children," the slain engineer's brother said, according to the New Delhi Television.

"We don't know what their parents thought but several villagers gathered and beat them.

"How can they think they were kidnappers?"

The injured were hospitalised. One was in serious condition.

The video of the violence, which was aired by Indian broadcasters, showed the mob carrying sticks and beating the men as police pleaded for them to stop.

Earlier this month, five people were killed in a similar attack in western India.

India has seen a string of mob attacks in the past few months ignited by messages circulated through social media that child lifting gangs were active in villages and towns.

At least 20 people have been killed and dozens injured in such attacks since early May.

Although Indian authorities have clarified that there was no truth to the rumours and that the targeted people were innocent, the deadly and brutal attacks, often captured on mobile phones and shared on social media, have spread across the country.