An aji, anji, or azu (按司?) was a ruler of a petty kingdom in the history of the Ryukyu Islands. The word later became a title and rank of nobility in the Ryukyu Kingdom. It has been theorized to be related to the Japanese aruji ("master"), and the pronunciation varied throughout the islands. 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 miyake 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".