Tamagusuku (玉城, 1296–April 22, 1336) was a legendary local ruler of Okinawa Island. According to Ryukyu's official history, Okinawa was split into three polities during the reign of Tamagusuku. He was the third son of Eiji (r. 1309-1313), he was the fourth ruler of the Eiso dynasty. The Aji of Ōzato fled south from Tamagusuku's capital at Urasoe and, along with his followers, became the King of Nanzan. The Lord of Nakijin, based some distance to the north, declared himself King of Hokuzan. He was succeeded by his only son Seii.