VOC and Mataram forces marched inland against Kediri in September 1678.
Following a proposal by the king, the troops were split to take three parallel, less direct routes, in order to cover more locations and "overawe" factions who were wavering on which side to take.
The king's idea worked, and as the campaign proceeded, local bands joined the troops, eager for booty.
Kediri was taken on 25 November by an assault force led by Captain François Tack.
The victorious troops proceeded to Surabaya, the largest city in East Java, where Amangkurat established his court.
Elsewhere, the rebels were also defeated.
In September 1679, combined VOC, Javanese, and Bugis forces under Sindu Reja and Jan Albert Sloot defeated Raden Kajoran in a battle in Mlambang, near Pajang.
Kajoran surrendered but was executed under Sloot's orders.
In November, the VOC and allied Bugis forces under Arung Palakka expelled the Makassarese rebels' stronghold in Keper, East Java.
In April 1680, after what the VOC considered the fiercest battle of the war, the rebellious lord of Giri was defeated and most of his family was executed.
As the VOC and Amangkurat won more victories, more and more Javanese declared their allegiance to the king.


After the fall of his stronghold in Kediri, Trunajaya managed to escape to the mountains of eastern Java.
VOC and the king's forces chased Trunajaya, who, isolated and deprived of food, surrendered to the VOC on 26 December 1679.
Initially, he was treated with respect as a captive of the VOC commander.
However, during a ceremonial visit to the royal residence in Payak, East Java, on 2 January 1680, he was personally stabbed by Amangkurat, and the king's courtiers finished him off.
The king defended this killing of a VOC prisoner by saying that Trunajaya had tried to kill him.
The VOC was not convinced by this explanation, but it chose not to call the king into account.
A romanticised account of Trunajaya's death appears in the 18th-century Central Javanese babads.
VOC and Mataram forces marched inland against Kediri in September 1678. Following a proposal by the king, the troops were split to take three parallel, less direct routes, in order to cover more locations and "overawe" factions who were wavering on which side to take. The king's idea worked, and as the campaign proceeded, local bands joined the troops, eager for booty. Kediri was taken on 25 November by an assault force led by Captain François Tack. The victorious troops proceeded to Surabaya, the largest city in East Java, where Amangkurat established his court. Elsewhere, the rebels were also defeated. In September 1679, combined VOC, Javanese, and Bugis forces under Sindu Reja and Jan Albert Sloot defeated Raden Kajoran in a battle in Mlambang, near Pajang. Kajoran surrendered but was executed under Sloot's orders. In November, the VOC and allied Bugis forces under Arung Palakka expelled the Makassarese rebels' stronghold in Keper, East Java. In April 1680, after what the VOC considered the fiercest battle of the war, the rebellious lord of Giri was defeated and most of his family was executed. As the VOC and Amangkurat won more victories, more and more Javanese declared their allegiance to the king.

After the fall of his stronghold in Kediri, Trunajaya managed to escape to the mountains of eastern Java. VOC and the king's forces chased Trunajaya, who, isolated and deprived of food, surrendered to the VOC on 26 December 1679. Initially, he was treated with respect as a captive of the VOC commander. However, during a ceremonial visit to the royal residence in Payak, East Java, on 2 January 1680, he was personally stabbed by Amangkurat, and the king's courtiers finished him off. The king defended this killing of a VOC prisoner by saying that Trunajaya had tried to kill him. The VOC was not convinced by this explanation, but it chose not to call the king into account. A romanticised account of Trunajaya's death appears in the 18th-century Central Javanese babads.
Trunajaya rebellion