Earliest recorded history dates from the 9th century. Hindu and Buddhist kingdoms flourished that gave rise to the magnificent temples tourists flock to today. Present day Yogyakarta owes its existence to a mid 18th Century "Family Feud". Prince Mangkubumi, who was the younger brother of the Ruler of Surakarta, left the Royal Palace (Kraton) to establish his own fiefdom after a contentious land dispute with his older brother. This breakup of the "Muslim Mataram Kingdom" was encouraged by the colonizing Dutch, as part of their divide and conquer strategy for the Dutch East Indies Company.
Prince Mangkubumi proclaimed himself "Sultan" and took the name Hamengkubuwono (5 syllables Ha - meng - ku - bu - wo - no). The translation of his chosen name is "The universe in the lap of the king" (The present Sultan of Yogyakarta is a direct descendent by the name of Hamengkubuwono X (the 10th). Hamengkubuwono I built his own Kraton (Royal Palace) and in his lifetime developed what became the most influential Javanese state in more than 100 years.
Yogyakarta has a long history of independent thought and outright resistance to authority. The Javanese hero known as Prince Diponegoro led a bloody five year war against the colonizing Dutch in the early years of the 19th Century. Eventually he was "captured" and exiled to Manado in North Sulawesi and died in Makassar, South Sulawesi. And Yogyakarta is the home of the first Indonesian University making it, very early on, the intellectual center of Java.
The first thoughts and deeds of what would eventually become The Republic of Indonesia, were nurtured and refined here. During the struggle for independence from Dutch Colonial rule from 1946 to 1949 Yogya, for a short time, was recognized as the Capital of the emerging Nation. Recognition of the area's crucial importance in the fight for independence resulted in Jogja being honored as "Jogja Daerah Istimewa" (Special Region). The area was granted Provincial Status in 1950 officially became one of Indonesia's 32 Provinces.