Medang Kingdom
In 1006, Srivijaya's alliance proved its resilience by successfully repelling the Javanese invasion. The Javanese invasion was ultimately unsuccessful. This attack opened the eyes of Srivijayan Maharaja to the dangerousness of the Javanese Medang Kingdom, so he patiently laid a plan to destroy his Javanese nemesis. In retaliation, Srivijaya assisted Haji (king) Wurawari of Lwaram to revolt, which led to the attack and destruction of the Medang palace. This sudden and unexpected attack took place during the wedding ceremony of Dharmawangsa's daughter, which left the court unprepared and shocked. With the death of Dharmawangsa and the fall of the Medang capital, Srivijaya contributed to the collapse of Medang kingdom, leaving Eastern Java in further unrest, violence and, ultimately, desolation for several years to come.