The Trunajaya rebellion (also spelled Trunojoyo; ) or Trunajaya War was the ultimately unsuccessful rebellion waged by the Madurese prince Trunajaya and fighters from Makassar against the Mataram Sultanate and its Dutch East India Company (VOC) supporters in Java (in modern-day Indonesia) during the 1670s.
The uprising was initially successful; the rebels gained Gegodog (1676), the majority of Java's north coast (1677), and the capital of Mataram (1677) from the royal army. During the retreat of the royal court, King Amangkurat I died. Amangkurat II, his son and successor, asked the VOC for assistance in exchange for cash payments and territorial concessions. The subsequent engagement of the VOC changed the course of the battle. Trunajaya was driven from Surabaya (1677) by VOC and Mataram forces, who also helped him reclaim lost territory and take control of his new capital at Kediri (1678). However, the uprising persisted until Trunajaya was captured at the end of 1679 and the other rebel leaders were overthrown, killed, or submitted (1679–1680). Amangkurat II personally executed Trunajaya in 1680 while he was a prisoner of the VOC.
After his father's death in 1677, AmangkuratII also faced rival claims to the throne. The most serious rival was his brother Pangeran Puger, who took the capital Plered in 1677 and did not surrender until 1681.
Background
Amangkurat I took the throne of Mataram in 1646, succeeding Sultan Agung, who had expanded Mataram's realm to include most of Central and East Java, as well as a few overseas vassals in southern Sumatra and Borneo. The early years of Amangkurat's reign were marked by executions and massacres against his political enemies. In response to the failed coup attempt of his brother Pangeran Alit, he ordered massacres of Islamic men who he believed were complicit in Alit's rebellion. Alit himself was killed during the failed coup. In 1659 Amangkurat suspected that Pangeran Pekik, his father-in-law and the son of the conquered Duke of Surabaya who lived at the Mataram court after Surabaya's defeat, was leading a conspiracy against his life. He ordered Pekik and his relatives killed. This massacre of East Java's most important princely house created a rift between Amangkurat and his East Javanese subjects and caused a conflict with his son, the crown prince (later Amangkurat II), who was also Pekik's grandson. Over the next few years, Amangkurat carried out a number of additional killings against members of the nobility who had lost his trust.
Raden Trunajaya (also spelled Trunojoyo) was a descendant of the rulers of Madura, who was forced to live in the Mataram court after Madura's defeat and annexation by Mataram in 1624. After his father was executed by AmangkuratI in 1656, he left the court, moved to Kajoran, and married the daughter of Raden Kajoran, the head of the ruling family there. The Kajoran family was an ancient family of clerics and was related by marriage to the royal family. Raden Kajoran was alarmed at the brutality of AmangkuratI's rule, including executions of noblemen at court. In 1670 Kajoran introduced his son-in-law Trunajaya to the crown prince, who had recently been banished by the king due to a scandal, and the two forged a friendship that included a mutual dislike of Amangkurat. In 1671 Trunajaya returned to Madura, where he used the crown prince's support to defeat the local governor and become the master of Madura.
Makassar was the principal trading center east of Java. After the 1669 VOC victory over the Gowa Sultanate in the Makassar War, bands of Makassarese soldiers fled Makassar to seek their fortune elsewhere. Initially, they settled in territories of the Banten Sultanate, but in 1674 they were expelled, and turned to piracy, raiding coastal towns in Java and Nusa Tenggara. The Mataram crown prince later allowed them to settle in Demung, a village in the eastern salient of Java. In 1675 an additional band of Makassarese fighters and pirates arrived in Demung led by the Kraeng of Galesong. These Makassarese itinerant fighters would later join the rebellion as Trunajaya's allies.