Kedatuan (ancient spelling: Kadatuan; Javanese romanization: Kedaton) were historical semi-independent city-states or principalities throughout ancient Maritime Southeast Asia in present-day Indonesia, Malaysia, and the Philippines. In a modern Malay and Indonesian sense, they could be described as kingdoms or polities. The earliest written record mentioning the term kadatuan was the 7th-century Srivijayan Telaga Batu and Kota Kapur inscription.
The term Kadatuan in Old Malay means "the realm of Datu" or "the residence of Datu". Constructed from old Malay stem word Datu with circumfix ke- -an to denote place. It derived from Datu or Datuk, an ancient Austronesian title and position for regional leader or elder that is used throughout Maritime Southeast Asia. It was mentioned in several inscriptions such as 7th century Srivijayan Old Malay Telaga Batu inscription, and 14th century Sundanese Astana Gede inscription. In wider sense it could refer to the whole principality, on smaller sense however, it could refer to palace where Datu resides. The Kota Kapur inscription mentioned "manraksa yan kadatuan çrivijaya" (to protect the Kadatuan of Srivijaya), thus Srivijaya is described as a kadatuan. In Srivijayan perspective, the realm of the Kadatuan Srivijaya was described consists of several wanua (settlements) each led by a datu (datuk), which means community leader or elder. All of this realm are under control of central kadatuan which also led by a datu. The highest datu in Srivijaya was Dapunta Hyang.
Kedatuan is known and widely spread in the Malay-speaking region, including the east coast of Sumatra, the Minangkabau lands, the Malay peninsula, the Borneo coast and the Filipino archipelago. In Javanese, the term Ratu is used instead of Datu, thus in Java Karaton, Keraton or Kraton is used instead of Kedaton to describe the residence of regional leader. The term is also known in Java as Kedaton, the meaning however, has shifted to architectural term to refer to the inner compound of the living quarter inside keraton (palace) complex. For example, there is the Kedaton complex within the central part of Keraton Surakarta palace in Central Java.
Smaller Kedatuan were often become subordinate to more powerful neighboring Kedatuan, which in turn were subordinate to the central king (Maharaja). The more powerful Kedatuan, sometimes grew to become powerful kingdoms, and occasionally tried to liberate themselves from their suzerain and sometimes enjoyed times of independence, and in turn might subjugate neighboring Kedatuan. Kedatuan, large and small often shifted allegiance, or paid tribute to more than one powerful neighbor.
Some Kedatuan, such as Srivijaya, rose to become empires. It is suggested that during its early formation, Srivijaya was a collection or some kind of federation consisting of several kadatuans (local principalities), all swearing allegiance to the central ruling Kadatuan ruled by Srivijayan Maharaja. There are also some Kedatuans like the Kedatuan of Madya-as and the Kedatuan of Dapitan which were ruled purely by datus.