[1] In 1719, Pakubuwana I died and his son Amangkurat IV took the throne in 1719, but his brothers, Princes Blitar and Purbaya contested the succession.
When they were repulsed by the cannons in VOC's fort, they retreated south to the land of Mataram.
Their uncle, Prince Arya Mataram, ran to Jepara and proclaim himself king, thus began the Second War of Succession.
In May and June 1723, the remnants of the rebels and their leaders surrendered, including Surengrana of Surabaya, Princes Purbaya and Dipanagara, all of whom were banished to Ceylon,[1] except Purbaya, who was taken to Batavia to serve as “backup” to replace Amangkurat IV in case of any disruption in the relationship between the king and VOC since Purbaya was seen to have equal "legitimacy" by VOC.
It is obvious from these two Wars of Succession that even though VOC was virtually invincible in the field, mere military prowess was not sufficient to pacify Java.