text: When Parvati heard word of this, she was so enraged that she decided to destroy all of creation. At her call, several ferocious multi-armed forms, the yoginis, arose from her body and threatened annihilation. Brahma, being the creator, naturally had his concerns, and pleaded that she reconsider her drastic plan. She acquiesced with two conditions: one, that the boy be brought back to life, and two, that he be forever revered before all the other gods in prayer.
  Shiva, having cooled down by this point, agreed to Parvati’s conditions. He sent his devotees out with orders to bring back the head of the first creature that  lay with its head facing the north. They soon returned with the head of a strong and powerful elephant named Gajasura, which Brahma placed atop the boy's body. Breathing new life into him, he was declared as the Gajanana and offered him the status of being the foremost among the gods in prayer, and  the title of the leader of all the ganas (classes of beings), Ganapati.
  Shiva and Gajasura
  Once, there existed an asura (demon) with all the characteristics of an elephant, called Gajasura, who was undergoing a penitence (tapas). Shiva, satisfied by this austerity, decided to grant him, as a reward, whatever gift he desired. The asura wished that he could emanate fire continually from his own body so that no one could ever dare to approach him. The deity granted him his request. Gajasura continued his penitence and Shiva, who appeared in front of him from time to time, asked him once again what he desired. The asura responded: "I desire that You inhabit my stomach." Shiva agreed.