Hariti’s history goes way back. I’m taking pre-Vedic. Something like 2500 BC or maybe even earlier. At that time the Iranians and Indo-Aryans were still one people– the Indo-Iranians. They worshipped two classes of deities: Devas and Asuras in Sanskrit, or Daevas and Ahuras in Avestan. After the Indo-Iranians split into two distinct civilizations, Vedic civilization (eventually) adopted the Devas as Gods. The Devas were engaged in a perpetual war with the Asuras, which evolved into evil-ish demigods. Ancient East Iranian civilization did the reverse, deifying the Ahuras and demonizing the Daevas (hence words like demon and devil.) The reasons for this reversal is not entirely clear. I’d like to imagine there was a fascinating, but long lost clerical-political drama involved, but who knows. The mystery of this era is half the appeal.
To reiterate and simplify:
Vedic civilization: Devas- Good guys, Asuras- Bad guys
East Iranian civilization: Ahuras- Good guys, Daevas- Bad guys
Vedic civilization had a Devi, a fertility/mother goddess by the name of Saraswati. She was the personification of a main river of Indo-Iranian culture. Therefore, her Iranian equivalent, Harauhuti, or Hariti was a Daevi, and a fertility/mother demon as odd as that sounds.* Hariti was believed to be a highly prolific mother with hundreds of children. The problem is that she would also steal other peoples children in order to cannibalize them and feed them to her young. In practical worship, she was treated as a demon of pestilence who needed to be appeased, probably because disease was a big killer of children.
That was the story, at least until Buddhists came out of the core Indian subcontinent and into modern Afghanistan. The Buddhists modified the original tale to fit better into the Indian cosmology. For instance, they transformed Hariti from a “Daeva” into a Yaksha (nature spirit), and gave her a backstory involving reincarnation. More importantly, they also extended the original tale to include a fateful interaction with the Buddha.**
According to the Buddhist legends, the childless victims of Hariti beg the Buddha to save them from her cruelty.*** To help, Buddha waits until Hariti leaves the house and traps her smallest child, Priyankara under his alms bowl. When she returns and cannot find her son she weeps and panics. She scours every city, village, mountain, lake, and forest on Earth. She franticly soars into the hells and into the divine realms in search of her son, even going so far as to demand entrance into the abode of Indra. After exhausting all other options, she too appeals to the Buddha for help. He points out that her suffering is minor compared to the combined suffering of all the mothers whose children she has killed. She agrees, and (although seemingly under duress) agrees to protect those who she formerly devoured if only Buddha renders his assistance. At that, Buddha lifts up his alms bowl and Priyankara hops out safe and sound. Thereafter Hariti converts to Buddhism, quits cannibalism, and becomes a spirit of fertility, childbirth, motherhood, and the protection of children (and also of healing in some areas, such as Southeast Asia where the top image is from.)
One might imagine that this was part of a marketing strategy by the Buddhists. Brand localization. Thats speculation. Anyway, from Afghanistan, Hariti was exported back to India, and the rest of the Buddhist world as a mother goddess and defender of children.
But isn’t this an odd progression? First there was an Indo-Iranian fertility deity which split into Saraswati and Harauhuti/Hariti. Two figures which are basically the same, only one is deified and the other is demonized. From the Indian point of view, Harauhuti is a reversal of Saraswati. Fast forward a few thousand years, the Indian Buddhists come back and adopt the reversed Saraswati, and reverse her once again into Hariti, a fertility spirit (Yaksha.) How many times can this character switch sides? Furthermore, now the Hindu and Buddhist pantheons have a duplication problem. They’ve got two deities with the same origin and function. Saraswati and Hariti both fertility deities based on the same river. I know I know, over time their backstories changed enough to be perceptibly different figures, but its still an interesting mythological duplication.