On this page
In the mansion of Prajapati Daksha, the drums of celebration sounded that day. One after another, beginning with Ashwini, he had placed the hands of all twenty-seven of his daughters into the keeping of Chandra, the moon. Twenty-seven daughters, and one bridegroom to hold them all. Having won Chandra as their lord, the maidens shone like the constellations strung across the night sky, and Chandra, blessed with such wives, grew more radiant by the hour. So it goes with a jewel and the gold that holds it, each drawing its fire from the other, neither of them fully seen alone. To anyone who watched, it looked as though twenty-seven stars had gathered into a garland around a single hero, and the whole of the night had been drawn into one soft light.

But among these twenty-seven was one named Rohini. No other wife was ever as dear to Chandra as she was. His entire mind, all his time, and his whole gaze inclined toward Rohini alone. This caused the remaining daughters deep sorrow. When sisters share a single lord and his affection narrows to only one of them, that same ache rose in their hearts. They had been given away on the same day, by the same father, with the same rites and the same blessings, and now twenty-six of them stood outside a door that opened every night for someone else. They rose together and sought refuge with their father, and told Daksha everything that was happening.
Hearing his daughters’ sorrow, Prajapati Daksha too grew downcast. He did not summon his son-in-law to his hall. He went himself. He came to Chandra and spoke in a very calm voice. Kalanidhi, keeper of the moon’s digits, he said, you were born into a pure and noble line. Toward all the women who live under your shelter, why does your heart hold this measuring out of more and less? To give one greater affection and another less does not become you. With the same feeling with which you took one to yourself, take them all. What has happened until now has happened. Never again behave with such partiality, for such conduct is said to lead a man all the way to hell.

Having made this appeal, Daksha returned home fully convinced that the imbalance would now be erased. But destiny was the stronger force. Something older than advice had its hand on Chandra, a delusion of the sort that has taken in the whole universe and never once announced itself, and against it good counsel simply slid off him. Bound by a powerful fate, Chandra sank even deeper into Rohini, and the honor due to his other wives went as neglected as before. When this news reached him, Daksha grew sorrowful once more. He came again in person, and speaking of sound conduct and of justice, he began to plead with Chandra for equal treatment.
Daksha’s curse
Daksha said, Chandra, listen. Many times before this we have made you the same appeal, and still you have not heeded our words. Therefore today we lay this curse upon you, that the wasting disease should take hold of you.
The moment he spoke, the wasting disease seized Chandra. His digits began to shrink day by day, and the light of the night grew dim and pale. Each night the sky was handed back a little less than the night before, and as the moon dwindled a great cry of distress rose across the whole world. The gods and the sages, stricken with worry, began to say, what will happen now, how will Chandra ever be whole and well again? Sunk in this sorrow, everyone was overcome. Chandra himself described his plight to Indra and the other gods and to the sages. When no path forward could be found, Indra and the gods together with Vasishtha and the other sages went to take refuge with Brahma, bowing before him in their agitation and setting the whole of it out.

Brahma’s remedy
Having heard them all, Brahma was taken aback, and before he answered he named what stood behind the whole affair: the Maya of Shiva, at work in it from the first. Then he said, gods, what has already come to pass cannot be turned back; the curse cannot be erased. But its effect can be relieved. I will tell you an excellent remedy; listen to it with respect. Let Chandra go with the gods to the sacred region called Prabhasa, where the land of Saurashtra runs out into the western sea. There, performing the rite of the Mrityunjaya mantra in the prescribed manner, let him worship Lord Shiva. Let him install a Shivalinga before himself and keep to tapas, austerity, without a day’s break. Pleased by this, Lord Shankara will free him of the wasting disease.

Worship at Prabhasa
At the urging of the gods and the sages, and obeying Brahma’s command, Chandra went to the region of Prabhasa, and they did not send him off alone. They consoled Daksha, walked the wasted moon down to that shore themselves, and called the waters of Sarasvati and the other holy rivers into the place, and only when the ground was ready did they leave him to it. There he installed a Shivalinga of earth before himself and kept to tapas without pause for six months. With the Mrityunjaya mantra he worshiped Lord Mrityunjaya, the conqueror of death, made a hundred million repetitions of the mantra, and stood unbroken with a steady mind, meditating on Mrityunjaya throughout. Seeing his devotee absorbed in such austerity, Lord Shankara, tender toward those who love him, was pleased, and appearing before him, he spoke.

Shankara said, Chandra, may all be well with you. Whatever your heart desires, name it, and let it be your boon. Your devotion has reached me. I am pleased, and there is no excellent gift I will hold back from you.
Chandra said, lord of the gods, when you are pleased, what could remain impossible for me? Even so, my lord, do not let this wasting disease eat my body any further. Forgive whatever offense I may have committed, and stay kind to me always.
Shiva said, Chandra, in one fortnight let a single digit of yours wane each day, and in the other fortnight let that same digit go on growing without pause. The curse would have what it was owed and the moon would keep his life, emptied through half of every month and filled again through the other half. This is why the moon is seen now to shrink and now to swell.
After this, Chandra praised Lord Shankara with heartfelt devotion, first as the one who wears no form at all, and then as the form standing in front of him. The gods and the sages came hurrying back to that shore, blessed the moon, folded their palms, bowed, and prayed: great god, lord of gods, stay here, and let Uma stay here with you. Pleased with the gods, and to raise the glory of that region and to spread Chandra’s fame through all three worlds, Lord Shankara came to be called Someshwara there, after Chandra’s own name Soma, and grew renowned across the three worlds as Somnath. Among the Jyotirlingas, his is the very first name to be spoken.
The glory of Somnath
When a worshiper honors Somnath, Lord Shankara destroys his consumption, his leprosy, and his other diseases. What the curse did to the moon, the linga undoes for whoever comes to it: the same wasting met at the same shore and stopped there. Blessed is that Chandra, and fulfilled in every purpose, by whose name the lord of all three worlds, Lord Shankara himself, sanctifies the earth and abides forever in the region of Prabhasa.
There too all the gods established the Somakunda, the pool in which Shiva and Brahma are held to dwell forever, shared between the two of them. This Chandrakunda is famed upon the earth as a tirtha, a pilgrimage water that destroys sin. Whoever bathes in it is freed from all sins, and comes up out of it clearer in mind than he went in. Incurable diseases such as consumption are undone by bathing in that pool for six months. Whatever desire a person carries when resorting to this excellent tirtha, that desire he surely obtains, of this there is no doubt.
By the power of this boon and this tirtha, Chandra was cured, and he returned to his work as before, giving the night back its light. The gods and the sages bowed to Shiva, walked once around that holy place in praise of it, and went home with the moon whole again among them. This is the katha of the manifestation of Somnath, the first of the Jyotirlingas. Whoever listens to it with devotion, or recites it to others, is forever released from all sins.

Source: Shiva Purana (Gita Press, Sankshipta Shivapurananka), Kotirudra Samhita