Once there were two demons named Shumbha and Nishumbha, who invaded devaloka and defeated the demigods. Indra the ruler of the gods, along with the othergods went to the Himalayas to get Lord Shiva's help in retrieving their abode. Together, they prayed to Goddess Parvati. Parvati heard their prayer while she was bathing, so she created another goddess, Chandi (Ambika) to assist the gods by vanquishing the demons. Chanda and Munda were two demon generals sent by Shumbha and Nishumbha. When they came to battle her, Goddess Chandi created a dark goddess, Kali (in some accounts, called Kaalratri). Kali/Kaalratri killed them, thereby acquiring the name Chamunda.