Sultan Agung (literally, "Great Sultan" or "Majestic Sultan") is subject of a substantial amount of literature due to his legacy as a Javanese ruler, a fighter against the incursions of the Dutch East India Company, a conqueror, and his existence within a cultural framework where myth and magic are well intertwined with verifiable historical events and personages.
Sultan Agung became the ruler of Mataram in 1613 and the next year attacked Surabaya, as well as Malang which lies south of Surabaya, and the eastern end of the Java island, but failed to conquer them both. He was however able to extraxt a significant indemnity and used this in 1615, to conquer Wirasaba (present day Mojoagung, near Mojokerto), an operation which he personally lead. In 1616, Surabaya attempted to attack Mataram in retaliation, but lacking allies the Surabaya army was crushed by Sultan Agung's forces in Siwalan, Pajang (near Surakarta). The coastal city of Lasem, near Rembang, was conquered later in 1616, and Pasuruan, south-east of Surabaya, was taken in 1617. Tuban, one of the oldest and biggest cities on the coast of Java, was taken in 1619.
Surabaya had been Mataram's most formidable adversary thus far. Agung's grandfather, Senapati or Senopati, had not felt strong enough to attack this powerful city, and his father, Panembahan Seda Krapyak, attacked it to no avail. Sultan Agung weakened Surabaya by capturing Sukadana, Surabaya's ally in southwest Kalimantan, in 1622, and the island of Madura, another ally of Surabaya, in 1624 after a fierce battle. After five years of war Agung finally conquered Surabaya in a siege in 1625. With Surabaya brought into the empire, the Mataram kingdom encompassed all of central and eastern Java, and Madura, except for the west and east end of the island and its mountainous south (except for Mataram, of course). In the west Banten and the Dutch settlement in Batavia remained outside Agung's control.
The economy of Mataram was centered on agriculture, thus Sultan Agung who was openly contemptous of trade, saw no need to maintain significant naval forces. This was later to prove costly when in 1629 he attacked and attempted to drive the Dutch out of their base at the coastal city of Jakarta. Though he possessed larger and superior land based forces, the Dutch had decisive advantages in naval power and were able to withstand the Siege of Batavia.
After the failure of the siege, Agung turned against the Balinese, then controlling Balambangan in East Java, in a “holy war” against infidels. His campaign was successful in Java, but he was unable to extend his power to the island of Bali itself. Bali thus retained its identity as a Hindu state in the midst of the predominantly Muslim states of the archipelago.
Apart from his conquests the Sultan also sought to rationalize and improve the internal government of his kingdom. He reformed the tax-code and brought the courts and judicial system more in line with Qurʾānic precepts. He commissioned the building of the Karta Palace in 1614, the Royal Graveyard of Imogiri, as well as other social and civic structures within the kingdom.
By 1625, Mataram was the undisputed ruler of most of Java. However, its military strength did not deter Mataram’s vassals from rebellion, due to his inability to conquer Batavia. Pajang rebelled in 1617, and Pati rebelled in 1627. Following the capture of Surabaya in 1625, expansion halted as the empire was beset by rebellions. In 1630, Mataram crushed a rebellion in Tembayat (southeast of Klaten). However, in 1631-36, Mataram had to suppress the rebellion of Sumedang and Ukur in West Java. Agung's attempt to capture Batavia in 1628-29, and drive the Dutch from Java ended in failure.
In 1632 Sultan Agung began building Imogiri, his burial place, about 15 kilometers south of Yogyakarta. Imogiri remains the resting place of most of the royalty of Yogyakarta and Surakarta to this day which in Agung's complex buried Sultan Agung, Queen Batang, and their sons. Agung died in the spring of 1646, leaving behind an empire that covered most of Java and stretched to its neighboring islands.
The development of the sacred dance bedhaya, and important developments in gamelan and wayang are attributed to the court of Sultan Agung. However, there is almost no historical evidence for the claims of high artistic achievement, and there is little information at all about the arts in the court. Some written evidence comes from a handful of mentions in Dutch accounts, which can be difficult to interpret. However within the complex field of folklore that attributes Sultan Agung with various powers and activities, the field of achievements is much greater. Sultan Agung is also attributed with the founding of the unique Javanese calendar – this established a uniquely indigenous calendar which is still in use.
Sultan Agung's major legacy lies however in the administrative reforms he undertook in the conquered territories. The ever increasing large territorial extent of these territories led him to create an innovative and rational administrative structure. He created "provinces" by appointing people as adipati (equivalent to Duke) at the head of territories called kadipaten (Duchy), particularly those territories in the western part of Java, where Mataram was facing Banten and Batavia, two places who resisted his wars of conquest. A kabupaten like Karawang, for instance, was created when Sultan Agung appointed prince Kertabumi as its first adipati in 1636. When the V.O.C. (the Dutch East India Company) took control of Mataram territories, it kept the kadipaten structure. Under the colonial administration of the Netherlands Indies, adipati, now called bupati, were called regenten and kadipaten, now kabupaten, regentschappen. The title of a bupati consisted generally in a formal name, for instance "Sastradiningrat" in the case of Karawang, preceded by "Raden Aria Adipati", hence "Raden Aria Adipati Sastradiningrat" (shortened into R. A. A. Sastradiningrat). The word adipati survived in the colonial system.
The Dutch had grouped kabupaten into regions under a resident, called residenties. The Indonesian government kept the kabupaten but disbanded the residenties in the 1950s, resulting in kabupaten being administrative subdivisions directly under a province. The laws on regional autonomy promulgated in 1999 give a high degree of autonomy to the kabupaten, not to the provinces. Sultan Agung's legacy is also recognised by modern Indonesia.
Sultan Agung is revered in contemporary Java both for his unification of Java, modernizing reforms, as well as his wars with the Dutch. In the Sukarno era he was nominated and confirmed as a National Hero of Indonesia (Pahlawan Nasional Indonesia). His existence within a cultural framework where myth and magic are intertwined and the scarcity of verifiable records of his early life have elevated him to heroic and near-mythical status. In the syncretic religious culture of Java, with its mixture of Hinduism, Buddhism and Islam; pilgrimage to his graveyard complex is considered auspicious, and many make considerable effort to go to Imogiri at appropriate times and days in the Javanese and Islamic calendars.