Hindu Mythology, Vedic and Puranic
PART II.: CHAPTER VIII.

"The origin and purpose of Ganesa's existence are more fully taught in the Skanda. [**] Siva addressing Parvati says, "During the twilight that intervened between the Dwarpara and Kali Yugas, women, barbarians, Sudras, and other workers of sin obtained entrance to heaven by visiting the celebrated shrine of Someswara (Somnath). Sacrifices, ascetic practices, charitable gifts, and all the other prescribed ordinances ceased, and men thronged only to the temple of Siva. Hence old and young, those skilled in the Vedas and those ignorant of them, and even women and Sudras, ascended to heaven, until at length it became crowded to excess. Then Indra and the gods, afflicted because thus overcome by men, sought the protection of Siva, and thus addressed him: 'O Sankara! by thy favour heaven is crowded with men, and we are nearly expelled from it. These mortals wander wherever they please, exclaiming, "1 am the greatest, I am the greatest; " and Dharmaraja (Yama), beholding the register of their good and evil deeds, is lost in astonishment. The seven hells were intended for their reception; but, having visited thy shrine, their sins have been remitted, and they have attained to a most excellent future!' Siva replied, Such was my promise to Soma, nor can it be infringed; all men, therefore, who visit the temple of Someswara must ascend to heaven; but supplicate Parvati, and she will contrive some means for extricating you from this distress.'

"The gods then invoked Parvati in laudatory strains: 'Praise be to thee, O supreme of goddesses! Supporter of the universe, praise be to thee, who createst and destroyest! Grant us thy aid, and save us from this distress!' Having heard the prayer of Indra and the gods, thou, O goddess! wert moved with compassion; and gently rubbing thy body, there was produced a wondrous being with four arms and an elephant's head, and then thou didst thus address the gods: 'Desirous of your advantage, have I created this being, who will occasion obstacles to men, and, deluding them, will deprive them of the wish to visit Somnath, and thus shall they fall into hell.' Hearing this, the gods returned to their homes delighted.