The bhArgava sage mArkaNdeya narrated the 3 tales of the fierce goddess and the battles they fought.
The first tale was that of mahAkAli. On account of her mAya, the great god viShNu lay in slumber when the plane was submerged in the waters at the end of the kalpa. There arose from the wax in his ears two terrible daityas, madhu and kaiTabha. They rapidly advanced to slay brahmA when mahAkAli in order to awaken viShNu arose from his forehead and departed. viShNu having awoken fought the daityas in a relentless battle for 5000 years. At the end of it, under mahAkAli’s delusion the daityas sought a boon from vishNu. As the whole plane lay submerged in the waters, the daityas asked the boon that viShNu could only kill them in the spot where there was no water. viShNu granted it to them. He immediately raised the daityas to his thighs and beheaded them with the chakra.