 In 1019, after several years in self-imposed exile in a Mount Vanagiri hermitage, Airlangga rallied supports from officials and regents that are loyal to the former Isyana dynasty and began to unite the areas that had formerly been ruled by Medang kingdom, which had disintegrated after Dharmawangsa's death.He consolidated his authority, established a new kingdom and made peace with Srivijaya.The new kingdom was called the Kingdom of Kahuripan, the location of his capital, and stretched from Pasuruan in the east to Madiun in the west.