ruler, with shrewd diplomatic skills. In the midst of crisis brought by Javanese invasion, he secured Chinese political support by appeasing the Chinese Emperor. In 1003, a Song historical record reported that the envoy of San-fo-qi dispatched by the king Sri Cudamani Warmadewa, informed that a Buddhist temple had been erected in their country to pray for the long life of Chinese Emperor, thus asked the emperor to give the name and the bell for this temple which was built in his honour. Rejoiced, the Chinese Emperor named the temple Ch'eng-t'en-wan-shou ('ten thousand years of receiving blessing from heaven, which is China) and a bell was immediately cast and sent to Srivijaya to be installed in the temple. Dharmawangsa campaign against Srivijaya in 990's ultimately did not have much effect on Srivijaya's sovereignty. Srivijaya successfully repel the invasion and regain control of their kingdom possibly since 1003, since that year Srivijaya has sent number of envoys to Chinese court regularly until 1178. Mahapralaya Pucangan inscription describe in 1016–1017, Haji (king) Wurawari to revolt. He launched an invasion from Lwaram, attacked and destroyed the Mataram Palace, killing Dharmawangsa and most of the royal family. Wurawari was a vassal polity located in present-day Banyumas area, south of Karang Kobar. Lwaram is connected to the modern-day Ngloram village in Cepu region, Blora, Central Java. This sudden and unexpected attack took place during the wedding ceremony of Dharmawangsa's daughter, which rendered the court unprepared and shocked. This calamity was recorded in 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 Wurawari, the kingdom finally collapsed and fell to chaos. With the absence of Mataram paramount ruler, warlords in regional provinces and settlements in central and east Java rebelled and break loose from the central Mataram government and forming their own polities serving local dynasties. Raids and robbery were rampant ravaging the country. There was further unrest and violence several years after the kingdom's demise. Airlangga, a son of King Udayana Warmadewa of Bali and Queen Mahendradatta, also a nephew of slain King Dharmawangsa, managed to escape the destruction and went into exile in Vanagiri forest in interior Central Java. He later rallied popular support, reunited the remnants of the Mataram Kingdom and re-established the kingdom (including Bali) under the name of Kingdom of Kahuripan in