
Mataram eventually fell, perhaps at the hands of Sumatra based Sriwijaya Kingdom, which invaded Java in the 11th century. However, Javanese power began its revival in 1019 under King Airlangga, a semi-legendary figure who formed the first royal link between the island and Bali. Despite his role as a unifier, Airlangga later spit the kindom between his two sons, creating Jenggala to the east and Kediri to the west.
It was only a matter of time before the balance of power was to change once again. Early in 13th century commoner Ken Arok usurped the throne of Singasari (apart of Jenggala Kingdom) defeated Kediri and brought Jenggala under his control. The new kingdom ended in 1292 with the murder of its last king, Kertanegara but in its short 70n years Javanese culture flourished and some of the island's most stinking thempels were built,
Shivasism and new religion Shiva - Buddhism, which is still worshipped in Java and Bali today.