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 Medang 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 kshatriya code of honor, valiantly defend his court to his death. For this he was honored in his posthumous name Wijayamreta Wardhana which means "powerful (king) in glorious death".