Initially, police said, the culprit Naron Prakash gained entry into an house and picked up a girl and started to flee. But a boy threw stones at him, forcing him to drop her.
Later, he picked up a three-year-old girl who was playing outside her house. He threatened those who tried to chase him with an iron rod and in the melee, two motorcyclists were injured, police said.
He later ran into a shop, ransacked it and when some locals surrounded him, he allegedly smashed the girl to the ground, killing her, police said.
Angry villagers allegedly beat Prakash to death, sources said.
Prakash had reportedly come to Billur from Balehonnur in the district to work as a labourer.