King Avantivarman ascended the throne in 855 CE, founding the Utpala dynasty and initiating an era of peace, agricultural recovery, and architectural patronage documented in Kalhana's 12th-century chronicle, the Rajatarangini. Avantivarman established his capital at Viswasara (modern Awantipora) and constructed two monumental temples: the Shiva shrine of Avantisvara before his coronation, and the grander Vishnu temple of Avantiswami after ascending the throne.
Contrary to popular folklore that attributes its destruction to Mahmud of Ghazni (who was repulsed at Loharkot fortress in 1015 and 1021 CE and never entered the Kashmir Valley), historical chronicles record that the monument was systematically dismantled during the reign of Sultan Sikandar (1389–1413 CE), followed by seismic collapse and burial beneath alluvial silt until Daya Ram Sahni's excavations in 1913.












