as per another legend, the pandavas from mahabharatha were living in exile and were roaming around the forest of western ghats. they could not get water for performing their daily pooja. as sun was rising, arjuna, one of the princes, prayed to ganga to send water to the place and shot an arrow that split earth and brought forth a river. the river that originated is believed to be the arjuna river in modern times. the place where the temple was located was believed to be housing two amla trees (called "nelli" in tamil) and hence got the name as irunellinathar, which later went on to become karunellinathar.