Beginning and initial rebel victories The rebellion began with Makassarese pirates from
Demung village raiding trading towns along Java's northern coast. The first raid took place in 1674 in
Gresik but was repulsed. In 1675, leader of the Makassarese, the Kraeng of Galesong, allied with Warlord Trunajaya through a marriage agreement, and together started planning further raids. In the same year, the Makassarese–Madurese raiders took and burned principal cities in northeast Java, from
Pajarakan to
Surabaya and Gresik. Given the failure of Mataram forces, King
Amangkurat I appointed a military governor in
Jepara, the provincial capital of the northern coast, reinforcing the town and preparing a counterattack on Demung. However, Mataram forces that marched on Demung were defeated, and combined actions by Mataram and VOC ships along the coast controlled by the raiders were not always successful. The Kraeng of Galesong moved to Madura, the domain of his ally Trunajaya. In 1676, Trunajaya gave himself the title Panembahan (Lord of) Maduretna and secured the support of the Sunan (spiritual lord) of Giri, near Gresik. A VOC fleet attack later destroyed the raiders' base in Demung, but they did not take action against Trunajaya in Madura.
Battle of Gegodog (1676) In September 1676, a rebel army of 9,000 led by the Kraeng of Galesong crossed over from Madura to Java and later took Surabaya, the principal city of eastern Java. Mataram sent troops commanded by the crown prince Amangkurat (later
Amangkurat II) to meet the rebels. A battle took place in
Gegodog, east of
Tuban, in 1676, resulting in the complete defeat of the much larger Mataram forces. The loyalist army was routed, the king's uncle
Pangeran Purbaya was killed, and the crown prince fled to Mataram. The defeat was attributed to the crown prince's hesitation, as he delayed the attack for a prolonged period. In addition, there were rumours that he colluded with the enemy, including his former protégé Trunajaya. In the few months after the victory in Gegodog, the rebels quickly took Javanese northern trading towns from Surabaya westward to
Cirebon, including the towns of
Kudus and
Demak. The towns fell easily, partly due to destroyed fortifications desolated by the conquest of
Sultan Agung of Mataram about 50 years earlier. Only Jepara managed to resist capture, due to the combined efforts of the new military governor and VOC forces who reinforced the town just in time. The rebellion spread inland when Raden Kajoran, Trunajaya's powerful father-in-law based to the east of the Mataram capital, joined the rebellion. Kajoran and Trunajaya's forces marched on the capital but were repelled by loyalist forces.
Trunajaya North Coast offensive After gaining the victory in the
Battle of Gegodog, the rebels proceeded westwards to conquer Mataram Sultanate's remaining towns on the north coast of Java (also known as the Pasisir). By January 1677, the rebels had captured nearly every coastal town between
Surabaya and
Cirebon, with the exception of
Jepara.
Battle of Tuban (1676) In 1676, the rebels met with Mataram forces in Tuban, where the battle occurred. Here, the rebels succeeded in defeating the Mataram forces and created an opportunity to capture Surabaya, a coastal city in East Java.
Capture of Surabaya (1676) After the Battle of Tuban, the rebels pushed on to Surabaya and fought in battles against Mataram forces. The rebels succeeded in defeating the Mataram forces and captured Surabaya.
Battle of Jepara (1676) After the battles in Gresik, the rebels also fought battles against the Dutch in Jepara. They succeeded in defeating the Dutch in Jepara and burned the city. But the victory did not last long, because the Dutch and Mataram forces expelled the rebels and recaptured the city.
Battle of Cirebon (1676) The rebels captured Cirebon from Dutch forces, and they also burned and looted the city. This battle showed that the rebels were successful in making it more difficult for the Dutch and Mataram forces to defeat them.
VOC intervention and fall of Mataram's capital Battle of Surabaya (1677) In response to Mataram's request for intervention, VOC dispatched a large fleet containing Indonesian and European forces, commanded by Admiral
Cornelis Speelman. In April 1677 the fleet sailed to Surabaya, where Trunajaya was based. After negotiations failed, Speelman's forces
stormed Surabaya and took it after hard fighting. The troops proceeded to clear the rebels from the area surrounding Surabaya. VOC forces also took Madura, Trunajaya's native island, and laid his residence there in ruin. Trunajaya fled Surabaya and established his capital in
Kediri.
Fall of Pleret (1677) Although the rebels were defeated in Surabaya, rebel forces campaigning in the interior of Central and East Java had more success. The rebel campaign culminated in the
fall of the capital Plered in June 1677. The king was ill, and distrust among the royal princes prevented organized resistance. The king fled west with the crown prince and his retinue, allowing the rebels to enter and plunder the capital with little fighting. The rebels then withdrew to Kediri, taking the royal treasury with them.
Amangkurat II's accession and alliance with the VOC in Tegal Arum Complex,
Tegal Regency,
Central Java. , the king of Mataram from 1677, in a Javanese traditional painting. King Amangkurat I died during his retreat in
Tegal in July 1677. The crown prince succeeded his father took the title of Amangkurat II, and was accepted by the Javanese gentry in Tegal (his grandmother's hometown) as well as by the VOC. However, he failed to assert his authority in the nearby town of Cirebon, whose ruler decided to declare independence from Mataram with support from the
Banten Sultanate. Furthermore, his younger brother
Pangeran Puger (later PakubuwanaI) took the now-ruined capital, refused entry to AmangkuratII's loyalists, and declared himself king under the title of Ingalaga Mataram. Having no army or treasury and unable to assert his authority, Amangkurat decided to ally himself with the VOC. At this point, Admiral Speelman was in Jepara, sailing there from Surabaya after hearing of the fall of the capital. His forces had recovered important coastal towns in Central Java, including
Semarang, Demak, Kudus, and
Pati. Amangkurat moved to Jepara on VOC ships in September 1677. The king had to agree to sweeping concessions demanded by the VOC in exchange for restoring his monarchy. He promised the VOC the income of all harbour towns on the northern coast. The
Priangan highlands and Semarang would be ceded to the VOC. The king also agreed to recognize the jurisdiction of VOC courts over all non-Javanese residing in his domains. Dutch historian
H. J. de Graaf commented that by doing this, the VOC, being a corporation, engaged in a "hazardous speculation", which they expected to pay off in the future when their associate would regain his rule over Mataram. VOC–Mataram forces made slow progress against the rebels. By the beginning of 1678, their control was limited to several towns on the central northern coast. In 1678 Speelman became the Director-General of the VOC, replacing
Rijcklof van Goens, who became Governor-General (Speelman would become Governor-General in 1681). His command in Jepara was handed over to
Anthonio Hurdt, who arrived in June 1678.
Loyalist victories and the death of Trunajaya to take Trunajaya's capital at Kediri. 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, to secure more territory and intimidate wavering factions into declaring loyalty. The king's idea worked, and as the campaign proceeded, local bands joined the troops, eager for booty. Kediri was taken on 25November 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. Though initially treated with respect by the VOC, Trunajaya was personally stabbed by
Amangkurat II and the king's courtiers during a ceremonial visit to the royal residence at
Payak. 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.
End of Pangeran Puger's rebellion In addition to Trunajaya's forces, Amangkurat II continued to face opposition from his brother Pangeran Puger, who had taken the old capital in Plered and had claimed the throne for himself in 1677. Before the defeat of Trunajaya, Amangkurat's forces had not taken action against him. After Trunajaya was defeated, Amangkurat still could not convince his brother to submit. In September 1680 Amangkurat constructed a new capital in
Kartasura. In November, Amangkurat and VOC forces drove Puger from Plered. However, Puger quickly rebuilt his forces, took Plered again in August 1681, and nearly took Kartasura. In November 1681 VOC and Mataram forces again defeated Puger, and this time he submitted and was pardoned by his brother. == Aftermath ==