Mataram conquest of Surabaya

The Mataram conquest of Surabaya or Mataram-Surabaya War was a military campaign by the Sultanate of Mataram in the early 17th century that resulted in the capture of the Duchy of Surabaya (Kadipaten Surabaya) and its allies in eastern Java, in modern-day Indonesia. Prior to this conquest, Mataram and Surabaya were rivals for power in central and eastern Java. The campaign began in 1614 when Mataram, under the leadership of Sultan Agung, attacked Surabaya's allies, including Wirasaba. Surabaya and its allies launched a counterattack but were defeated near Pajang in 1616. Over the next few years, Mataram gradually conquered members of the Surabayan alliance, and by 1620, the city of Surabaya itself was under siege, holding out until it surrendered in 1625. With this conquest, Mataram unified most of central and eastern Java under its control, and cemented its position as the dominant power in Java. Surabaya and other conquered areas would remain in Mataram's hands until it was ceded to the Dutch East India Company in 1743.

Background
In the latter half of the 16th century, the Sultanate of Demak, the dominant power in the island of Java, disintegrated into several independent states. At the turn of the 17th century, three of these states emerged as the leading powers: the Sultanate of Banten in western Java, the Sultanate of Mataram in inland central Java, and the Duchy of Surabaya in coastal eastern Java. Mataram consolidated its power by absorbing other principalities: Pajang in c. 1588, Demak (1588), Madiun (c. 1590) and Kediri (1591). Following Mataram's unsuccessful westward expedition against Banten in about 1597, Mataram turned its expansion eastward, into areas under the influence of Surabaya.

The Duchy of Surabaya was centered roughly in today's city of Surabaya in the northern coast of eastern Java. It was a wealthy and powerful state, and the city was an important port in the trade route between Malacca and the Spice Islands., The city was approximately 37 km in circumference, and was fortified by canals and cannons. Allied with the nearby state of Pasuruan, the Duchy expanded its influence throughout the eastern part of Java in the beginning of the 17th century. By 1622, it was in control of Gresik and Sedayu in eastern Java. It was also the overlord of Sukadana and Banjarmasin in southern Borneo. More doubtful reports said it might have also extended its influence to Pasuruan, Blambangan, the Brantas valley region, and Wirasaba. Other than these, Surabaya was also allied with Tuban, Malang, Kediri, Lasem, all in eastern Java, as well as Madura off the northern coast. This alliance was primarily a response to the growing power of Mataram, and Surabaya was the founder and the most powerful member.

Conquest of Surabaya's allies
In 1613 Hanyakrakusuma (r. 1613 – 1645, later titled Sultan Agung, "the Great Sultan", and referred to in literature with that title) rose to the throne of Mataram. He began the eastward conquest by an incursion towards Surabaya's southern flank, the Eastern Salient, Malang, and possibly Pasuruan in 1614. Surabayan forces attacked this Mataram army during its homeward march, but was defeated. In 1615 Agung conquered Wirasaba, personally leading the troops there. Surabaya did not commit its troops to help Wirasaba, due to the fear that its other ally, Tuban, would take advantage, betray Surabaya, and attack it from the rear.

The conquest of the strategically important Wirasaba posed such a clear threat to Surabaya and other eastern states that the alliance rallied. They mobilized their troops and marched towards Pajang, a city under Mataram's control but ostensibly on the verge of rebellion. However, a Mataram spy in Tuban deceived the allied forces into taking a bad route towads Pajang. As a result, the allied army found itself isolated in Siwalan, near Pajang. This army was surrounded by Sultan Agung and defeated in January 1616.

Agung then won victories in Lasem (1616) and Pasuruan (1616–17). In 1617 Pajang finally rebelled against Mataram but was defeated, and the lord of Pajang fled to Surabaya. In 1619 Agung conquered Tuban, one of the strongest members of Surabaya's alliance. This conquest put Agung in control of Tuban's shipbuilding activities, and therefore allowed him to build a navy to challenge Surabaya's previous naval supremacy.

Sieges of Surabaya
By 1620, Mataram's main target shifted towards the city of Surabaya itself. From 1620 to 1625, Mataram forces periodically besieged Surabaya. The siege was difficult because part of Surabaya (including the ducal palace) was located between branches of the River Brantas, and it was in many parts surrounded by swampland, which formed a natural fortification and health risk for besiegers. In addition, the city was walled and fortified with cannons. Surabaya's position as a port city made it necessary for Mataram to blockade Surabaya by sea and by land. Logistical limitations and annual rainy seasons prevented Mataram from maintaining a continuous siege. Instead, Mataram followed a pattern of attacking during the dry season, destroying crops and pillaging harvests from the areas surrounding Surabaya.

Mataram sent five expeditions to attack Surabaya. The first, in 1620, involved 70,000 Mataram troops against Surabaya's 30,000, but the siege failed due to insufficient supplies for the Mataram troops. The second attempt in 1622 also failed due to lack of food supplies. The third attempt in 1623 also failed to conquer Surabaya. Mataram besieged Surabaya again in 1624, occupying and pillaging the surrounding settlements and forcing their residents to flee to the city. At the same time, Mataram also sent expeditions against Surabaya's remaining allies, notably Sukadana in Borneo, which fell in 1622, and Madura, which fell in 1624. These two overseas allies had been supplying Surabaya, and their defeat severely cut off the city.

The fifth and final siege took place in 1625, and Mataram troops were led by Tumenggung Mangun Oneng, assisted by Tumenggung Yuda Prasena and Tumenggung Ketawangan. Mataram dammed the river Brantas, limiting the water supply to the city, and spoiled the remaining water supply using dead animals. The overland siege, and previous conquest of Surabaya's overseas allies, caused a lack of food and other supplies in the city. Notably, only a sea route to Makassar was open. Considering the effects of the siege and the starvation in the city, Jayalengkara, the Duke of Surabaya, called a council with the city's nobility. One faction, notably including the exiled Duke of Pajang, pushed for continued resistance, but other nobles convinced Jayalengkara to surrender.

Jayalengkara became Sultan Agung's vassal in Surabaya, and the elderly duke was said to have died shortly afterwards. His son Pangeran Pekik was exiled to an ascetic life at the grave of Sunan Ngampel-Denta near Surabaya. Later, Pangeran Pekik lived in the court of Mataram, married Agung's sister, and, according to Dutch historian H. J. de Graaf, "did much to civilize the Court" of Mataram. The Duke of Pajang, a former subject of Mataram who had rebelled and fled to Surabaya, was executed by drowning.

Aftermath
The conquest eliminated Mataram's strongest rival to the east and allowed Sultan Agung to establish his sovereignty over most of the Javanese-speaking population of Java, as well as Madura. Of the Javanese-speaking regions, only Blambangan remained independent in the East. There were also Banten Sultanate and Dutch-controlled Batavia (today's Jakarta) in the West. Surabaya and other conquered regions on the northeastern coast of Java would remain in Mataram's hands until they were ceded to the Dutch East India Company in the aftermath of the 1741–1743 Java War. This meant that they were within the Mataram sphere of influence during the Mataram-driven formative period of the Javanese culture, during which present-day features such as Javanese etiquette, art, language, and social hierarchy were taking shape.

This conquest marked the maximum extent of Mataram's power. Having consolidated his power in central and eastern Java, Agung then turned westward to deal with the Dutch. His army attacked Batavia in 1628, and again in 1629, but these campaigns ended in a devastating defeat. After this failure, Mataram expansion stopped, and it would no longer be a threat to either Banten or the Dutch.

In addition, the campaign resulted in some destruction, especially along the Javanese northern coast. The fighting, sickness, and starvation, and the disruption of agriculture, caused the deaths of many – the number is unknown, but estimated to be large. Surabaya, no longer a port of importance, had lost its dominance over eastern Java. The destruction of the coastal towns contributed to the decline of Javanese trade and the rise of the Sultanate of Makassar in Sulawesi as a major centre of the spice trade in Nusantara.