Long ago, in the ancient kingdom of Vijayanagara, there was a revered sage who performed intense penance on the banks of the Tungabhadra River. Pleased with his devotion, Lord Vishnu appeared before him in the form of Ranganatha, reclining on the serpent Adishesha. The sage, filled with divine bliss, requested the Lord to stay in that place forever and bless the devotees.
Moved by the sage's devotion, Lord Ranganatha agreed and manifested in the form of an idol. The local king, hearing of this miraculous event, decided to build a grand temple to honour and house the deity. This temple was constructed in Anegundi, on the other side of the river from Hampi.