Chapter 31 of 43 · Koti Rudra Samhita · Overall chapter 302 of 464
Greatness of Rameshvara
On the shore before crossing to Lanka, Rama refuses to drink water offered to him until he has first worshipped a parthiva lingam, acknowledging to Shiva directly the uncomfortable fact that his enemy Ravana is Shiva's own favoured devotee - and receives both the promised victory and Shiva's permanent presence at the spot as Rameshvara in return.
Suta said
Next I will tell of the lingam called Rameshvara and how it arose in the past. Rishis, listen lovingly. Long ago Vishnu, beloved of the virtuous, took an avatara on earth. Brahmanas, Ravana, wide in his use of maya, carried off Sita, Janaka's daughter, to his house in Lanka. Searching for her, Rama came to the city of Kishkindha, became Sugriva's friend and killed Vali. He stayed there for some time in his search, conferring with Sugriva, Lakshmana and others. The king's son sent monkeys in the four directions. Hanuman was the foremost of those sent to find her, and the great monkey went to Lanka. From his mouth Raghava learned that Sita had been taken to Lanka, and he received Sita's crest jewel and was delighted. Brahmanas, with the lord of monkeys, Lakshmana, the leader Sugriva and a sacred army of strong vanaras numbering eighteen padmas, Rama went to the shore of the ocean. The salt ocean lies in the south. Rama went there and halted on its shore, loved by Shiva, served by Lakshmana and the vanaras. "Alas, where has Janaki gone? When shall I go and meet her? This army of vanaras must cross the fathomless ocean. The rakshasa who held up the mountain is very strong and valiant. His fortress Lanka is impossible to enter, and Indrajit is his son." So Rama thought as he stayed on the shore with Lakshmana, and Angada and the other forest-dwellers comforted him.
Meanwhile Raghava, supreme among Shiva's devotees, wanted water and lovingly said to his brother Lakshmana: "Lakshmana, lord of heroes, I am thirsty and wish for water. Have a vanara quickly fetch some." The vanaras dashed off in all ten directions and brought water, and bowing stood before him: "Lord, accept the water. We brought it at your command. It is tasty and the best, cool and life-giving." Pleased, he gave them a kind look, and Ramachandra accepted it. He was about to drink when, by Shiva's wish, he remembered: "I have not yet seen Shambhu. How can I drink water? He is Paresha, my lord, who gives every kind of bliss." Saying this, the supreme scion of Raghu drank the water. Afterward he worshipped an earthen lingam, performed the invocation and other rites, and arranged sixteen kinds of offerings. By the rules he lovingly worshipped the god Shankara, bowed, and tried to please him with divine hymns. Full of joy and devotion Rama prayed: "Lord Shambhu, Mahadeva, you are always kind to your devotees. Save me. I am your devotee and have taken refuge in you. My mind is troubled. You who help one cross the ocean of samsara, this water is fathomless. The rakshasa Ravana is very strong and brave. In battle this army of vanaras is fickle. How will my task be accomplished? How will I get my beloved back? So, ones excellent in vows, it is your work to help me. Lord, without your help my task cannot be done. Ravana is your own, and so in every way he is hard to defeat. He is arrogant from the boons you gave him, immensely brave, and has conquered the three worlds. I too am your servant and subject to you in every way. Sadashiva, think of this and favour me." Thus he prayed and bowed again and again, saying, "Victory to Shankara, who punishes the wicked. Victory." With mantras and meditation he praised Shiva, worshipped him again and bowed. His heart was flooded with love and his voice choked in his throat.
The god Shankara was greatly pleased. Maheshvara appeared on the ocean's shore with his companions, a mass of energy in a bright and wonderful form. Satisfied by the devotion in Rama's heart, Shiva said, "All will be well. Ask a boon." Seeing that form, all of them were purified. Raghava, devoted to Shiva's dharma, worshipped him, rejoiced, praised him in many ways and bowed, praying for victory over Ravana. Maheshvara, pleased with Rama's devotion, said lovingly, "Great king, may you be victorious." So Rama received Shiva's permission for victory. With head bowed and hands joined he prayed again: "Lord, to purify the worlds, stay here. Shankara, if you are satisfied, do this to help others." So Shiva took the form of a lingam there and became famous on earth as Rameshvara. By his power Rama crossed the ocean easily, quickly killed Ravana and the other rakshasas, and got his beloved back. The greatness of Rameshvara is wonderful and unmatched on earth. It gives pleasure and liberation and always grants devotees their wishes. A person who devoutly bathes Shiva at Rameshvara with divine water from Ganga becomes a jivanmukta. He enjoys all pleasures of this world, hard even for gods to gain, and at the end gains supreme knowledge and kaivalya. So I have told you of Shiva's divine jyotirlinga called Rameshvara. Hearing it destroys sins.
Retold in our own words from Bibek Debroy's English translation of the Shiva Purana (Penguin Classics). Names, numbers and the order of events follow the source.