The Mataram Kingdom, also known as the Medang Kingdom, has its unique characteristics as it was led by two dynasties: the Sanjaya dynasty and the Syailendra dynasty. The Mataram Kingdom was a Hindu-Buddhist kingdom that emerged in Central Java during the 8th century and lasted until the 11th century. The existence of Mataram Kingdom is recorded in the Canggal Inscription, found in Kadiluwih Village, Magelang. This inscription, written in Pallava script, contains the establishment of a lingga (a symbol of the god Shiva) by King Sanjaya.
According to the Mantyâsih Inscription from 892 Saka (907 AD), the first king of the Mataram Kingdom was Rakai Mataram Sang Ratu Sanjaya, who ruled from 732 to 760 AD. The name Mataram is derived from the Sanskrit word “Matr,” meaning “mother.” Initially, Mataram was referred to as Medang I Bhumi Mataram, hence also known as the Medang Kingdom. The exact location of the capital remains undiscovered. However, researchers suspect it was located along the Kedu-Prambanan axis, based on the presence of large temple structures indicating a major city of that time.

When it was established, the Mataram Kingdom was governed by the Sanjaya and Syailendra dynasties (732-929 AD) before eventually relocating to East Java, led by the Isyana dynasty (929-1016 AD). The two dynasties adhered to different religions: Syailendra predominantly followed Mahayana Buddhism, while Sanjaya followed Shaivism Hinduism. The rivalry for the throne resulted in rulers from both religions. Despite this competition, the people of Mataram coexisted with strong religious tolerance.
The rivalry between the Sanjaya and Syailendra dynasties ended in the 9th century, leading to their unification through the marriage of Rakai Pikatan from the Sanjaya dynasty to Pramodawardhani, the daughter of King Samaratungga from the Syailendra dynasty. However, this marriage faced opposition from Balaputradewa, the brother of Pramodawardhani.
Balaputradewa not only rejected their marriage but also attempted to seize power from Rakai Pikatan, resulting in a civil war in the Mataram. After his coup failed, he fled to Sumatra and became the king of Sriwijaya, the first maritime kingdom in the archipelago centered in Palembang, Sumatra. After defeating Balaputradewa, Rakai Pikatan established the Loro Jonggrang Temple, now known as Prambanan Temple.

The social life of the Mataram Kingdom was marked by a caste system, comprising brahmanas (priest), kshatriyas (noble), vaisyas (merchant), and sudras. There was also social stratification based on an individual’s position within society, whether in the royal bureaucracy or material wealth. The social stratification in Mataram was overlapping; for example, kshatriyas could hold religious positions and live as hermits in monasteries.
The economy of the Mataram Kingdom relied heavily on agriculture, particularly rice cultivation. Additionally, the kingdom benefited economically from trade with other kingdoms. This trading system flourished during the reign of Dyah Balitung. Mataram also developed a high-value culture, with art and architecture rapidly advancing by the late 8th century. Borobudur and Prambanan temples stand as testaments to Mataram’s architectural greatness. Today, Borobudur is recognized as the largest Buddhist temple in the world, while Prambanan is the largest Hindu temple in Indonesia.
In addition to architecture, the Mataram Kingdom advanced literature and performing arts. One notable literary work from Ancient Mataram is the Kakawin Ramayana, believed to originate from the reign of King Dyah Balitung. The Isyana dynasty also produced a literary work titled Sang Hyang Kamahayanikan, which discusses Mahayana Buddhism.
The Mataram Kingdom moved its capital seven times, from Central Java to East Java, starting during the reign of Mpu Sindok (928–947 AD). The kingdom relocated to East Java due to the eruption of Mount Merapi, which caused economic paralysis and land destruction. This eruption also resulted in many casualties, including Mataram aristocats. Mpu Sindok then established the Medang Kingdom, initially based in the upper Brantas River. He became the founder of the Isyana dynasty, which replaced the Sanjaya and Syailendra dynasties in East Java.

The decline of Ancient Mataram was due to conflicts with the Sriwijaya Kingdom. Historians believe there were disputes between the two kingdoms, one reason being that Sriwijaya was led by Balaputradewa, a noble descendant of Mataram from the Syailendra dynasty, who sought to reclaim Java from the Sanjaya dynasty. Some also speculate that Mataram challenged Sriwijaya’s dominance to prove its strength.
The conflict between Mataram and Sriwijaya peaked during the reign of Dharmawangsa, the last king of Mataram. In 990 AD, Dharmawangsa launched a naval invasion to Sriwijaya to capture Palembang. This invasion is documented in Chinese historical records. However, the invasion did not succeed in conquering the powerful Sriwijaya at that time.
Dharmawangsa ultimately fell in 1017 during the Pralaya Medang event, an assault by Wurawari forces supported by Sriwijaya. Pralaya refers to a cataclysmic event that caused widespread destruction, killing many nobles, including Dharmawangsa, turning Java into a sea of blood. In this attack, Airlangga, Dharmawangsa’s nephew, survived. He was the son of Gunapriyadharmmapatni, a daughter of the Mataram king, and Udayana Warmadewa, the king of Bali. Airlangga, still a descendant of Mataram, later founded the Medang Kahuripan Kingdom in East Java in 1019.
Sources:
Bosch, F. (1974). Masalah penyebaran kebudayaan Hindu di Indonesia. Jakarta: Bhatara.
Fallahnda, B. (2020, December 21). Sejarah kerajaan Mataram Kuno, lokasi, & nama raja-raja di Jawa. tirto.id. Retrieved from https://tirto.id/sejarah-kerajaan-mataram-kuno-lokasi-nama-raja-raja-di-jawa-f8lK
Ningsih, W. (2023, January 25). Kehidupan sosial budaya kerajaan Mataram Kuno. Kompas.com. Retrieved from https://www.kompas.com/stori/read/2023/01/25/230000779/kehidupan-sosial-budaya-kerajaan-mataram-kuno?page=2
Ningsih, W. (2023, Octobre 25). Dharmawangsa, raja terakhir Mataram Kuno. Kompas.com. Retrieved from https://www.kompas.com/stori/read/2023/10/25/140000879/dharmawangsa-raja-terakhir-mataram-kuno?page=2
Tjahjono, B., Priswanto, H., Chawari, M., Mudjijono, M., Noerwidi, S., & Wibowo, H. (2024). The Sirih Temple: The temple made of tuff stone of the outside of the ancient Mataram. Pusat Riset Arkeologi Prasejarah dan Sejarah BRIN. DOI:10.2991/978-2-38476-224-8_6