In Java, royal cities were always inseparable from their fortresses. This was also true during the Islamic Mataram era—every capital city, from Kotagede, Plered, Kartasura, and Surakarta to Yogyakarta, was surrounded by defensive walls. Even in Sanskrit, the word kota (city) literally means fortress.
The Yogyakarta Palace was built with two layers of walls. The inner layer, called cepuri, encloses the kedhaton or palace core. Beyond it lies a much larger and sturdier wall called Baluwarti—often simply referred to as Beteng. Baluwarti not only protected the palace but also enclosed the residences of the Sultan’s relatives, the Abdi Dalem (palace retainers), and what is now known as the Jeron Beteng neighborhood.
Interestingly, the word Baluwarti is believed to have come from the Portuguese baluarte, meaning fortress. Historian Denys Lombard suggested that this linguistic link makes sense, since Baluwarti’s construction coincided with the building of Tamansari, which was designed by a Portuguese architect.
The construction of Baluwarti began during the reign of Sultan Hamengku Buwono I (1755–1792). Shaped like a rectangle—though longer on the eastern side where the Crown Prince’s Sawojajar Palace stood—the walls stretched 1200 meters east to west and 940 meters north to south. A deep moat called jagang encircled the fortress, with brick fences and rows of gayam trees planted as shade along the paths.
At first, the fortress was made of stacked wooden logs. Later, it was reinforced with bricks, mortar, and crushed red tiles, rising nearly five meters high with an inner terrace where soldiers stood guard.
The fortress had five main gates, or plengkung, each topped with a platform and equipped with cannons. These were:
Plengkung Tarunasura/Wijilan (northeast)
Plengkung Jagasura/Ngasem (northwest)
Plengkung Jagabaya/Tamansari (west)
Plengkung Nirbaya/Gadhing (south)
Plengkung Madyasura/Gondomanan (east)
Each gate had a drawbridge that could be lifted, cutting off access across the moat. Originally, the gates were open only from morning until evening, later extended from 5 a.m. to 8 p.m., signaled by the palace guards’ drums and trumpets.
At the four corners stood Pojok Beteng (bastions), protruding outward in European style. These pentagonal towers housed cannons and watch posts, inspired by Dutch fortifications in Batavia. Completed in 1782, they were among the final projects of Hamengku Buwono I.
The fortress played a role in many key events. In 1812, during the Geger Sepehi, British troops stormed Yogyakarta and blew up the gunpowder storage in the Northeast Bastion, damaging the walls. As a result, Plengkung Madyasura was permanently sealed to prevent enemy entry, only reopened in 1923 under Sultan Hamengku Buwono VIII.
Over time, the fortress shifted roles. Two major events—the 1867 earthquake and the Japanese occupation in 1942—transformed it into living space. Abdi Dalem and local residents were allowed to settle along the walls, with some even dismantling sections to expand their homes. Much of the original structure has since disappeared beneath housing developments.
Of the five original gates, only two survive in their original arching form: Plengkung Wijilan and Plengkung Gadhing. Among the bastions, three remain intact: the Southeast, Southwest, and Northwest corners. Sections of the wall are still walkable, particularly between Plengkung Gadhing and the Southeast Bastion.
Once a symbol of defense and separation, the fortress of Yogyakarta has evolved into a witness of urban life. Physically unchanged in place but transformed in meaning, it has gone from guarding royal exclusivity to embracing the people who now live within its walls.