The Keshava Temple was built in 1268 CE by Somanatha Dandanayaka (also known as Somanayaka), a powerful general and minister in the court of the Hoysala king Narasimha III. The Hoysala kingdom was at its cultural peak during this period, and the temple represents the mature phase of Hoysala architecture. Unlike the earlier Hoysaleswara Temple at Halebidu which was a royal commission, the Keshava Temple was built by a nobleman, reflecting the spread of Hoysala patronage beyond the royal family.
The temple was constructed in just three years (1265-1268 CE), an astonishingly short period for such an elaborately carved structure. The temple remained in continuous worship until the 16th century when it fell into disuse, but its structural integrity was preserved. The temple was documented by British archaeologists in the 19th century and was maintained by the Mysore Archaeological Department and later the Archaeological Survey of India.
In 2023, UNESCO inscribed the temple as part of the Sacred Ensembles of the Hoysalas. The village of Somanathapura was named after the patron Somanatha, who also built a dam on the Kaveri River and established an agrahara (scholarly settlement) with 200 Brahmin families. The temple's foundation inscription, written in Kannada and Sanskrit, provides a detailed account of Somanatha's lineage, his military achievements, and the land grants made for the temple's maintenance.
The inscription also records that the temple was consecrated by the Vaishnava acharya Vedanta Desika, linking the temple to the Sri Vaishnava tradition of Ramanuja.











