An aji, or anji was a ruler of a small kingdom in the history of the Ryukyu Islands. The word later became a title and rank of nobility in the Ryukyu Kingdom. It ranked next below a prince among nobility. The sons of princes and the eldest sons of aji became aji. An aji established a noble family equivalent to a Shinnà Âke of Japan.
The aji arose around the twelfth century as local leaders began to build Gusuku (Ryukyuan castles). Shà  Hashi was an aji who later unified Okinawa Island as king. The title aji variously designated sons of the king and regional leaders. During the Second Shà  Dynasty, when the aji settled near Shuri Castle, the word came to denote an aristocrat in the castle town.
A pattern for addressing a male aji began with the place he ruled and ended with the word aji, for example, "Nago Aji". For women, the suffix ganashi or kanashi (å é£å¿Â) followed: "Nago Aji-ganashi".
The kanji used to spell this word, "æÂÂå¸", appears to be phono-semantic matching, consisting of the words "keep under control" + "official".
The Liuqiu Guan Yiyu (çÂÂçÂÂ館訳èªÂ), a Okinawan word list written in Chinese, states that "大åÂÂ大人ãÂÂ大åÂÂé£å®Âåª" ("[The] Tang nobility [are called] *taj.taw.na.an.tÃÂré"), while the Zhongsang Zhuanxinlu (ä¸Âå±±ä¼Âä¿¡é²) says "èÂÂçº å®Â主" ("[A] lord [is called] an.tÃÂy").
Konkà Âkenshà «, a Okinawan word list written in Japanese, says "æÂÂã®ãÂÂãÂÂãÂÂãÂÂãÂÂãªãÂÂãÂÂ御太åÂÂ御å¦ÂäºÂ御åÂÂæ§ÂæÂ¹å¾¡å«Âé¨ã®御äºÂ" ("Some anjikyanashi [are the] great nobility of crown princes, the well of the imperical concubine, the ways of the great child, and parts of the great bride"). Various Old and Middle Okinawan anthologies variously spell it as ãÂÂãÂÂ, ãÂÂãÂÂ, ãÂÂã¡, ãÂÂã¢, ãÂÂãÂÂãÂÂ, ãÂÂãÂÂãÂÂ, and æÂÂå¸.
Examples of the word in Ryukyuan languages include Amami Yamatohama , Okinawan Nakijin-Yonamine , Okinawan Shuri , Miyako Irabu-Nakachi .
Various etymologies have been proposed for this word. For instance, Iha Fuyu had suggested that this word has been derived from the Japanese word aruji "master".