Yogyakarta (/ˌjɒɡjəˈkɑrtə/ or /ˌjoʊɡjəˈkɑrtə/;Malay: [jɔɡjaˈkarta]; also Jogja, Jogjakarta) is a city and the capital of Yogyakarta Special Region in Java, Indonesia. It is renowned as a centre of classical Javanese fine art and culture such as batik, ballet, drama, music, poetry, and puppet shows. Yogyakarta was the Indonesian capital during the Indonesian National Revolution from 1945 to 1949. One of the districts in Yogyakarta, Kotagede, was the capital of the Mataram Sultanate between 1575 and 1640. The city is named after the Indian city of Ayodhya from the Ramayana epic. Yogya means 'suitable, fit, proper', and karta, 'prosperous, flourishing' (i.e., 'a city that is fit to prosper').
Mataram Kingdom (8th - 10th Century CE)
According to Canggal inscription dated 732, the area traditionally called as "Mataram" became the capital of Medang Kingdom, identified as Mdang i Bhumi Mataram established by King Sanjaya. Mataram became the center of a refined and sophisticated Javanese Hindu-Buddhist culture, for about three centuries its heartland in Kewu Plain (southern slope of Mount Merapi) around Prambanan witnessed the construction of numerous candi including Borobudur and Prambanan.
Around the year 929, the centre of the kingdom was shifted to East Java by Mpu Sindok, who established the Isyana Dynasty. The exact cause of the move is still uncertain; however, a severe eruption of Mount Merapi volcano or a power struggle probably caused the move. Historians suggest that, some time during the reign of King Wawa of Mataram (924—929), Merapi volcano erupted and devastated the kingdom's capital in Mataram. Although missing from the historical record since the migration of the capital of Medang kingdom in the 10th century to the eastern Java, the valley area in the south of Mount Merapi since the 15th century still inhabited and according to later account, perhaps become part of the region called "Pengging".
Majapahit Empire (1293 - 1527)
During the Majapahit era, the area surrounding modern Yogyakarta identified again as "Mataram" and recognize again as one of Majapahit 12 provinces in Java ruled by a Duke titled 'Bhre Mataram'. During the reign of Hayam Wuruk (1350 to 1389), the title of Bhre Mataram was held by king's nephew also son in-law Wikramawardhana.
Mataram Sultanate (1575 - 1620)
Kotagede (now part of districts in Yogyakarta) was established as the capital of Mataram Sultanate. The palace of the founder of Mataram Sultanate, Panembahan Senopati established in scene of part of Alas Mentaok. During the reign of Sultan Agung Hanyokrokusumo (1613-1645), Sultanate Mataram reach its zenith as the greatest kingdom in Java, expanded its influence to Central Java, East Java and half of West Java. After a two times move its capital, (Palace of Pleret and Place of Kerta, both located in Bantul Regency), the capital of Mataram Sultanate moved to Kartasura.
Aftermath of the Gianti Treaty (1745 - 1945)
The Yogyakarta sultanate palace's main pavilion
The Taman Sari Water Castle
During the reign of Pakubuwono II, a civil war broke out in Mataram Sultanate. The civil war was fought between Prince Mangkubumi and his elder brother, Sunan Pakubuwono II. The civil war started when Sunan Pakubuwono II agreed to cooperate with the VOC, ceded some of Mataram territory to the Dutch, and submitted to foreign powers. His younger brother, Prince Mangkubumi stood against the agreement due to concern that his people would become slaves under Dutch rule. Prince Mangkubumi defeated the Pakubuwono forces and declared sovereignty in the Kingdom of Yogjakarta occupying southern parts of the former Mataram Sultanate.