In a story from the Shakta "Maha-Bhagavata Purana", which narrates the creation of all the Mahavidyas, Sati, the daughter of Daksha and the first wife of the god Shiva, feels insulted that she and Shiva are not invited to Daksha's yagna ("fire sacrifice") and insists on going there, despite Shiva's protests. After futile attempts to convince Shiva, the enraged Sati transforms into the Mahavidyas, including Matangi. The Mahavidyas then surround Shiva from the ten cardinal directions; Matangi stands in the northwest. Another similar legend replaces Sati with Kali (the chief Mahavidya) as the wife of Shiva and the origin of Matangi and the other Mahavidyas. The Devi Bhagavata Purana describes Matangi and her fellow Mahavidyas as war-companions and forms of the goddess Shakambhari.