Dharmawangsa

Dharmawangsa, stylized regnal name Sri Maharaja Isyana Dharmawangsa Teguh Anantawikramottunggadewa (died 1016) of the Isyana dynasty, was the last Hindu raja of the Kingdom of Mataram, who reigned from 990 to 1016 CE. He is also known by his posthumous name Wijayamreta Wardhana, which means "powerful in glorious death", which refers to his fight to the death.

Reign
He succeeded Sri Makutawangsa Wardhana. Dharmawangsa was the patron of the translator of the Mahabharata text into Old Javanese. Dharmawangsa was either the son or son-in-law of Sri Makutawangsawardhana, preceding King of Mataram and grandson of Mpu Sindok.

Dharmawangsa conquered several areas, including Bali, and established a colony in West Kalimantan. Dharmawangsa's sister, Princess Mahendradatta, married Udayana, Raja of the Warmadewa Dynasty in Bali, and had a son, Airlangga.

In the year 990, Dharmawangsa launched a naval invasion on Sriwijaya in Sumatra and unsuccessfully attempted to capture Palembang, as Sriwijaya repelled the invaders. Dharmawangsa's invasion was mentioned by both ambassadors to China in 992.

Death
In 1016, Srivijaya launched a retaliation attack and destroyed the Watugaluh Palace in Java. Srivijaya forces assisted the lesser king Haji (king) Wurawari of Lwaram to revolt, attacked and destroyed the Mataram palace, killing Dharmawangsa and most of the royal family. This sudden and unexpected attack took place during the wedding ceremony of Dharmawangsa's daughter, which rendered the court unprepared and shocked. Dharmawangsa follows warrior code of honor and valiantly defends his court to his death. For this, he was honored in his posthumous name Wijayamreta Wardhana which means "powerful (king) in glorious death".

This calamity was recorded in the Javanese account as the pralaya (the debacle) the death of the Mataram kingdom. With the death of Dharmawangsa and the fall of the capital, under military pressure from Srivijaya, the kingdom finally collapsed and fell to chaos. There was further unrest and violence several years after the kingdom's demise.

Dharmawangsa's heir and nephew, Airlangga, son of Mahendradatta and Udayana, was aged only 16 at the time. However, he escaped the invaders and went on to become a founder of the Kahuripan Kingdom, the successor of the Mataram.