The temple's origins date back to the ancient epic Ramayana, with the current structure primarily built during the 12th century.