Its ruins once consisted of two temples dedicated to Shiva and Vishnu,[1] and were built under king Avantivarman of the Utpala dynasty in the 9th century CE.
[2][3] Locals call the temple Pandav Lari, meaning "house of the Pandavas".
He had built many Hindu temples in Kashmir during his reign, which were largely destroyed due to Muslim conquests.
Prior to the Muslim conquests, Kashmir was a center of Shaivism and Hindu philosophy, and a seat of Sanskrit learning and literature.
The Avantiswami is smaller, but similar in planning to the earlier Martand Sun Temple.