Administrative divisions of the Ryukyu Kingdom

The administrative divisions of the Ryukyu Kingdom were a hierarchy composed of districts, magiri, cities, villages, and islands established by the Ryukyu Kingdom throughout the Ryukyu Islands.

Divisions
There were three districts (方) or hō: Kunigami (area) (国頭), Nakagami (area) (中頭), and Shimajiri (area) (島尻), which roughly correspond to the borders of the three Okinawan kingdoms during the Sanzan period. There were 57 magiri (間切) throughout the kingdom including the Amami Islands. In concept they were similar to present-day Japanese prefectures, but in size they were closer to Japanese cities, towns and villages. There were four cities: Shuri (首里), Naha (那覇), Tomari (泊), and Kume (久米). They were comparable to Japanese urban prefectures. There were over 600 villages (村) throughout the kingdom including the Amami Islands. There were approximately 24 shima (島) or "outlying islands", but only including islands that weren't already part of a magiri.

History
The three districts are based on the three kingdoms of Hokuzan, Chūzan, and Nanzan. The origin of the magiri system is unclear, but was solidified by the beginning of the reign of Shō Shin, the third king of the Second Shō Dynasty of the Ryukyu Kingdom who ruled between 1477 and 1526. The magiri were originally controlled by individual aji, but as the Ryukyu Kingdom centralized at the turn of the 15th century the aji relocated to the capital of the kingdom at Shuri. After this period the title of aji became symbolic, and low-ranking officials were assigned the day-to-day administration of the magiri.

Each magiri had several villages, sometimes referred to as shima, which represented an administrative unit similar to the mura, or village, in feudal Japan. Each magiri had five to ten villages. Ryukyuan commoners were registered to a particular village, and movement to or from the administrative areas was generally not permitted. Under the system of Shō Shin the central government at Shuri assigned each village a noro priestess to carry out the religious functions of the settlement.

The magiri system continued to varying degrees in the Amami Islands even after they were ceded to Satsuma Domain in 1624. On Okinawa Island, there were 27 magiri at the turn of the 17th century, but by the 19th century Misato, Kushi, Motobu, Ginowan, Oroku, Onna, Ōgimi, and Yonagusuku were created, bringing the total to 35. The magiri system continued after the end of the Ryukyu Kingdom and annexation of the islands by Japan in 1879. In 1907, under Imperial Edict 46, the Japanese administrative system of cities, towns, and village organization was extended to Okinawa. The magiri system was officially abolished on April 1, 1908.

List of magiri
The following is a list of magiri by district:

Kunigami District
Kunigami District (国頭方), also known as Yanbaru (山原) in Okinawan and Kunigami or Hokuzan-fu (北山府) in Kanbun, roughly correspond to the territory of Hokuzan during the Sanzan period.

Nakagami District
Nakagami District (中頭方), also known as Wiikata (上方) in Okinawan or Chūzan-fu (中山府) in Kanbun, roughly correspond to the territory of Chūzan during the Sanzan period.

Shimajiri District
Shimajiri District (島尻方), also known as Shimukata (下方) in Okinawan or Nanzan-fu (南山府) in Kanbun, roughly correspond to the territory of Nanzan during the Sanzan period.