Avantivarman of Kashmir

Avantivarman was a king who founded the Utpala dynasty. He ruled Kashmir from 855 to 883 CE and built the Avantiswami Temple.
Reign.
Avantivarman was the grandson of Utpala, one of the five brothers who had taken control of the Karkota throne. Raised by Utpala's minister Sura, Anantivarman ascended the throne of Kashmir on 855 CE, establishing the Utpala dynasty and ending the rule of the Karkotas. Avantivarman appointed Suyya, an engineer and architect as his prime minister. The country had been badly affected due to the numerous civil wars over the last forty years and Avantivarman's reign restored the economy. Suyya carried out desilting of the Jhelum river and diverted its course.
Arts and architecture.
Avantivarman was a patron of the arts and the most notable scholar of his time was Anandhavardana, the author of the "Dhvanyaloka". He founded the cities of Avantipur and Suyapur, which was named after Suyya. He built many Hindu temples dedicated to both Vishnu and Shiva as well as Buddhist monasteries. Notable among the temples were the temples of Avantiswara and Avantiswami dedicated to Shiva and Vishnu respectively in Avantipur. The reign of avantiverman witnessed a remarkable rivival of Sanskrit learning in Kashmir.He built a dam on vitasta river to save kingdom from devastating flood.
Notable books written during Avantivarman's reign include Haraviyaja written by Ratnakara and Dhvanyaloka written by Anandavardhana.
Death and succession.
Avantivarman died in 883 CE and his death was followed by another civil war among his descendants. The throne was finally captured by Sankaravarman in 885 CE, who ruled till 902 CE.