The Rameshwaram Temple has a very interesting legend related to it. It is believed that after Lord Rama killed Ravana, a Brahmin to save his wife, Sita. He wanted to expiate the 'dosha' of killing a Brahmin. Therefore, on the advice of sages, Lord Rama with his wife and brother, Lord Lakshmana installed and worshipped a lingam in order to absolve his sins.He wanted to worship the largest lingam and so, he asked Hanuman to bring it from the Himalayas. It was taking very long and therefore, Sita made a small lingam, Ramalingam from sand which is still there in the sanctum. Hanuman was disappointed since Rama did not worshipped the lingam brought by him. So, Lord Rama placed his lingam next to Ramalinga and named it Shivalingam.At the beginning, the Rameshwaram Temple was just a shed. The credit for the present structure goes to the endeavours put in by rulers of Setupathi dynasty over the centuries. In the seventeenth century, Dalavai Setupati built a portion of the eastern Gopuram. In late eighteenth century, the world-famous third corridor called as Chokkatan Mandapam was constructed by Muthuramalinga. The contribution of the Jaffna kings of the Sethupathy dynasty to the Ramanathaswamy Temple was also commendable. King Jeyaveera Cinkaiariyan helped in shipping stone blocks from Koneswaram temple to renovate the temple. His successor Gunaveera Cinkaiariyan looked after the structural development of this temple.