Duchy of Surabaya

The Duchy of Surabaya (Indonesian and Javanese: Kadipaten Surabaya) was a Javanese principality centered in Surabaya, on the northeastern coast of Java (in today's East Java, Indonesia), that existed as an independent polity from c. 1546 to 1625. It became independent following the disintegration of the Demak Sultanate, and by the beginning of the 17thcentury had become the leading power in east Java and the most important port on Java's northeastern coast. Subsequently, it entered into decades of conflict with the Mataram Sultanate that ended in the victory of Mataram and the fall of Surabaya in 1625.

History
The Portuguese writer Tomé Pires mentioned that a Muslim lord was in power in Surabaya in 1513 though likely a vassal of the Hindu–Buddhist Majapahit. At that time, Surabaya was already a major trading port, owing to its location on the River Brantas delta and on the trade route between Malacca and the Spice Islands via the Java Sea. During the decline of Majapahit, the lord of Surabaya resisted the rise of the Demak Sultanate, and only submitted to its rule in 1530. Surabaya became independent after the death of Sultan Trenggana of Demak in 1546. There is a dearth of historical records about the duchy in the second half of the 16thcentury. In 1589 Surabaya led other east Javanese principalities in opposing the Pajang Sultanate, Demak's successor state, in Japan (today's Mojokerto), thereby stopping Pajang's eastward expansion. Javanese historians said that a holy man, a descendant of Sunan Giri, convinced the opposing sides to return without a battle. Dutch historian H. J. de Graaf wrote that in the second half of 16thcentury, the court of Surabaya became a centre of culture and Islamic Old Javanese literature, as opposed to the "upstart" central Javanese courts such as the Pajang and Mataram Sultanates.

In the early years of the 17th century, Surabaya, allied with Pasuruan, expanded its influence throughout eastern Java. It became the most powerful state in east Java, rivalling the Mataram Sultanate in central Java. 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 and Blambangan (both in the eastern salient of Java), the Brantas valley region, and Wirasaba. Surabaya formed and led an alliance of eastern Javanese principalities, primarily in response to the growing power of Mataram. Other than Surabaya and its subordinate areas, the alliance also included Tuban, Malang, Kediri, Lasem, all in eastern Java, as well as Madura off the northern coast.

The Dutch East Indies Company (known by its Dutch acronym, VOC) established a trading post in Gresik, under Surabaya's control, in 1602. Dutch writers wrote about Surabaya's expanding influence. In 1620 Dutch writers described Surabaya as a rich and powerful state with a field army of 30,000 men. The city measured 37 km in circumference, surrounded by a canal and protected with cannon.

Conflict with Mataram and decline
As both Mataram and Surabaya expanded their territories and influence, they began to compete for hegemony in east and central Java. In 1590, Mataram, under the rule of Panembahan Senopati, attacked and took Madiun, which were supported by Surabayan auxiliaries. Mataram and Surabaya backed rival pretenders In a war of succession in Kediri. The Surabaya-backed faction won in 1591, and the loser fled to Mataram. In 1598 and 1599 Mataram unsuccessfully attacked Tuban, a member of the Surabaya alliance. In 1610 Mataram began conducting raids on Surabaya itself, destroying its rice crops and sacking Gresik in 1613. Dutch writers reporting from the trading post of Gresik wrote of the frequent Mataram–Surabaya conflicts in the early 17thcentury. The Dutch post was closed in 1615 as the conflict intensified.

In 1613 Hanyakrakusuma ((r. 1613 – 1645), later titled Sultan Agung, "the Great Sultan", and referred to as such in literature) rose to the throne of Mataram. He began a campaign that would ultimately result in the fall of Surabaya. In 1614 Agung invaded several allies of Surabaya, notably including Wirasaba. Surabaya and its allies then counterattacked and invaded Mataram, but were defeated in Siwalan, near Pajang, in January 1616. Subsequently, Mataram gradually conquered members of Surabaya's alliance, notably Tuban in 1619.

In 1620 Mataram attacked the city of Surabaya itself. Because of a combination of geographic, logistical, and climatic factors, Mataram was not able to launch a direct assault on Surabaya, or maintain a continued siege on the city. Instead, Mataram periodically attacked Surabaya during the dry seasons, laying sieges, destroying crops, and pillaging harvests from the surrounding areas. The final siege took place in 1625. Mataram forces dammed the river Brantas, limiting the city's water supply, and spoiled the remaining water supply using dead animals. With the city starved and riddled with disease, Jayalengkara, the duke of Surabaya, decided to surrender. He was allowed to stay in Surabaya as Agung's vassal, but the elderly duke died soon afterward.

The decline of Surabaya and other coastal towns in northeastern Java contributed to the decline of Javanese trade in the following period, and the rise of the Sultanate of Makassar in Sulawesi as a major centre of the spice trade in Nusantara.

Economy
With an economy oriented toward trade, Surabaya became a major trading port by the early 16thcentury. Its ships were seen throughout Nusantara, as far west as Malacca and as far east as the Spice Islands. It owed its importance to its location on the international trade route between those two points. In addition, its location on the delta of the Brantas river connected it with inland agricultural areas. The upriver communities supplied it with rice, both as food for Surabayans and as a trading commodity for Surabayan merchants. Surabaya supplied the inland communities with trade goods such as clothing, jewelry, and porcelain. Most other port towns on the northeastern coast of Java, such as Demak and Tuban, were allied with Surabaya before they fell under Mataram control. The VOC had a trading post in Gresik, a port town under Surabaya's control, from 1602 to 1615. At this time, the VOC's territorial control in Java was limited to Batavia (today's Jakarta).

Rulers
The rulers of Surabaya had the rank of adipati, usually translated to English as a duke. The rulers became Muslim from at least 1513, when Surabaya was still subordinate to the Hindu-Buddhist Majapahit. The dukes of Surabaya claimed to be descendants of Sunan Ampel (1401–1481), one of the nine saints (wali songo) credited with the spread of Islam in Java. However, deGraaf wrote that there was no evidence for this claim although he considered it likely that the ruling family were distantly related to Sunan Ampel. The last duke of Surabaya was Jayalengkara ((r. ? – 1625)), who at the fall of Surabaya in 1625 was already blind and aged. His son, Pangeran Pekik, was forced to live in Mataram after Mataram's victory. He later married Sultan Agung's sister, and according to deGraaf, "did much to civilize the Court" of Mataram.