Read the story
In February 1755, in a village called Giyanti, a prince named Mangkubumi signed a treaty that cut the kingdom of Mataram in two. The eastern half went to Sunan Pakubuwono III at Surakarta. The western half went to Mangkubumi, who took a new name, Sultan Hamengkubuwono I, and began a palace at Yogyakarta.
He is credited with designing the kraton himself, and it rose in 1755 and 1756. Earthquakes and later sultans have rebuilt much of it, but a sultan still lives here. The courtyards still carry gamelan music, Javanese dance, and wayang shadow puppets.
The sultan who made this palace matter to a nation was born in 1912 and raised partly by a Dutch family, who called him Henkie. Hamengkubuwono IX studied in the Netherlands and was crowned in 1940. When Indonesia declared independence in August 1945, he and Paku Alam VIII, ruler of the neighboring Pakualaman, threw their support behind the new Republic. In early 1946, with Jakarta lost to the Dutch, the young country quietly moved its capital here, and it stayed until the Dutch invaded in December 1948.
By most accounts, the sultan proposed the dawn attack on occupied Yogyakarta on March 1, 1949, and let his palace hide the troops. Later he served as Indonesia's vice president.
That loyalty bought Yogyakarta something unique: it is the only region of Indonesia headed by a monarchy. A 2012 national law made it official: the reigning sultan is the governor.
Which raised a question the old rules never had to answer. Hamengkubuwono X has five daughters. In the spring of 2015 he issued two royal proclamations. The first changed his own title. The second named his eldest daughter crown princess, under a new name: Mangkubumi. His half-brother called it unacceptable, a break with palace law.
The founder's own name, now carried by a woman. His palace is still waiting to learn how that story ends.