The man in Baghpat, Uttar Pradesh, lured the child into an abandoned house Saturday and tried to assault her.
When the girl screamed, nearby monkeys rushed to attack the man. He fled, threatening to kill her family if she told anyone.
The child returned home and told her parents. Her father told media, "My daughter would have been dead by now if the monkeys had not intervened."
Police are searching for the man after the parents reported the incident.