Battle of Gegodog

The Battle of Gegodog (also spelled Battle of Gogodog) took place in 13 October 1676 during the Trunajaya rebellion, and resulted in the victory of the rebel forces over the Mataram army led by the Crown Prince Pangeran Adipati Anom. Gegodog is located in the northeastern coast of Java, east of Tuban.

Battle of Gegodog
Part of the Trunajaya rebellion
Date13 October 1676
Gegodog (east of Tuban, present day East Java, Indonesia)
Result Trunajaya victory
Forces of Trunajaya Flag of the Sultanate of Mataram.svg Mataram Sultanate
Commanders and leaders
Karaeng Galesong

Flag of the Sultanate of Mataram.svg Pangeran Adipati Anom (future Amangkurat II)
Flag of the Sultanate of Mataram.svg Pangeran Purbaya 

Flag of the Sultanate of Mataram.svg Pangeran Singasari
9,000[1] unknown, much larger.[1]

Prior to the battle, Trunajaya invaded eastern Java and occupied Surabaya and other towns. King Amangkurat I sent an army to face him, led by the crown prince. The crown prince expected a sham battle from Trunajaya, his former protégé. However, Trunajaya offered a real fight which resulted in a decisive victory over the much larger royal army. The royal army was routed, and the king's elderly uncle Pangeran Purbaya was killed after leading a futile charge. The rebel victory was followed by further successes - including more conquests and the defections of Mataram subjects into Trunajaya's side.


Prior to the rebellion, the Madurese nobleman Trunajaya lived in exile in Mataram and had a close relation with the crown prince of Mataram (then known as Pangeran Adipati Anom, future Amangkurat II). Trunajaya's father-in-law and a prominent nobleman Raden Kajoran had introduced him to the crown prince in 1670.[2] Both had a grudge against King Amangkurat I, the crown prince over the execution of Pangeran Pekik, the prince's maternal grandfather,[3] and Trunajaya over his exile and the execution of his father.[2][4] The two forged a friendship, partly due to this mutual dislike.[2] In 1670 or 1671, Trunajaya left Mataram for his homeland Madura and became its ruler.[2] He used the crown prince's patronage (as well as his own family's name) to gain followers which allowed him to wrest control of the island.[2]

The Trunajaya rebellion began in 1674 as Trunajaya's forces conducted raids against the cities under Mataram control.[5] In 1676, a rebel army of 9,000 invaded East Java from their base in Madura, and took Surabaya – the principal city of East Java – shortly after.[1] The army consisted of East Javanese, Madurese and Makassarese and was led by Trunajaya and his Makassarese ally Karaeng Galesong.[1]


Location of the battle in Java

In 1676, the King decided to send a large army to suppress the rebellion.[6] The army was much larger than Trunajaya's, but was predominantly made up of conscripted peasants.[7][8][9] It also included West Javanese auxiliaries.[10] The king put the crown prince in charge of this army; he was either unaware of the crown prince's role in the rebellion or planned to have him murdered during the campaign.[6] Other princes also joined the army, including the King's uncle Pangeran Purbaya, Sultan Agung's only remaining brother who was almost 80 years old, as well another son of the king Pangeran Singasari who was the crown prince's archenemy.[11][12]

The Mataram army marched to Jepara, and then eastwards towards territories controlled by the rebels.[10] It met the rebel army in Gegodog, east of Tuban on the north coast of eastern Java.[10] The Crown Prince initially expected that he and his protégé Trunajaya would only fight a sham battle and then both forces would join against the King.[6][8] However, Trunajaya betrayed his former friend and patron, and the presence of other princes might have prevented the crown prince from faking the battle.[6][8][12] After a long wavering, the prince ordered an attack on 13 October.[10] Trunajaya offered a real battle, which went badly for the royal army.[6] In a desperate effort, the aged Pangeran Purbaya rallied the troops and led a final charge.[11] According to Thomas Stamford Raffles, he "performed extraordinary feats of valour", had his horse shot under him and continued to fight on foot, before he was overpowered and slain.[11][10] The charge failed, and the battle ended in a decisive victory for the rebels. Mataram troops disintegrated and retreated, along with the Crown Prince and other princes, towards the capital. [11][10]


After the rebel victory, Javanese defection into Trunajaya's side accelerated, and Trunajaya followed up his victory by further conquests of Mataram's territories. His forces advanced westward along the northern coast, and by January 1677 nearly all of Mataram's northern coast, with the notable exception of Jepara, fell into his hands.[10][8] Towns as far west as Cirebon submitted to Trunajaya.[10] Jepara did not fall due to the united efforts of the king's military governor there and VOC forces who arrived there from Batavia.[10] The inland advance was slower, but rebel forces under Raden Kajoran would ultimately overrun and sack the capital in June 1677.

For Mataram, the defeat was disastrous.[10] After the battle, Mataram could only wage a defensive campaign.[8] Its territories, expanded by Sultan Agung decades before, would fall into rebel hands, laid in ruin and their fortifications dismantled,[10] culminating in the fall of the capital.[13] The rebellion would continue for several more years, and Mataram would be forced to request assistance from the Dutch East India Company (VOC) - in exchange for geopolitical and financial compensations - to turn the tide of the war.

The crown prince was blamed for the defeat and was accused of colluding with the enemy.[10] After Gedogog, he was replaced by his brothers, Pangeran Martasana and Pangeran Puger, in leading the Mataram forces.[8] After the fall of the capital he fled with his father, and upon his father's death during the retreat, he took the throne as Amangkurat II.



  1. ^ a b c d Andaya 1981, pp. 214–215.
  2. ^ a b c d e Pigeaud 1976, p. 67.
  3. ^ Pigeaud 1976, p. 66.
  4. ^ Ricklefs 2008, p. 90.
  5. ^ Pigeaud 1976, p. 69.
  6. ^ a b c d e Ricklefs 1993, p. 33.
  7. ^ Andaya 1981, p. 215.
  8. ^ a b c d e f Kemper 2014, p. 68.
  9. ^ Taylor 2012, p. 49.
  10. ^ a b c d e f g h i j k l Pigeaud 1976, p. 70.
  11. ^ a b c d Raffles 1830, p. 178.
  12. ^ a b Ricklefs 2008, p. 92.
  13. ^ Pigeaud 1976, p. 73.