The Mataram kingdom (/mɑːtɑːrɑːm/, Javanese: ꦩꦠꦫꦩ꧀, Javanese pronunciation: [mətaram]); also known as Medang kingdom was a Javanese Hindu-Buddhist kingdom that flourished between the 8th and 11th centuries. It was based in Central Java, and later in East Java. Established by King Sanjaya, the kingdom was ruled by the Shailendra dynasty and later Ishana dynasty.
During most of its history the kingdom seems to have relied heavily on agriculture, especially extensive rice farming, and later also benefited from maritime trade. According to foreign sources and archaeological findings, the kingdom seems to have been well populated and quite prosperous. The kingdom developed a complex society, had a well developed culture, and achieved a degree of sophistication and refined civilisation.