Yogyakarta owes its establishment to Prince Mangkubumi, who in 1755 returned to the former seat of Mataram and built the kraton of Yogyakarta. He took the title of sultan, adopted the name of Hamengkubuwono (The Universe on the Lap of the King) and created the most powerful Javanese state since the 17th century.
Yogya has always been a symbol of resistance to colonial rule; it was the heart of Prince Diponegoro’s Java War (1825–30) and became the capital of the republic from 1946 until independence in 1949.
When the Dutch occupied Yogya in 1948, the patriotic sultan locked himself in the kraton and let rebels use the palace as their headquarters. The Dutch did not dare move against the sultan for fear of arousing the anger of millions of Javanese who looked upon him almost as a god. As a result of the sultan’s support of the rebels, Yogya was granted the status of a special region when independence finally came.