尚巴志王
The castle was built in the Gusuku Period of Ryukyuan history. It was the home of the Aji of Tamagusuku Magiri. After Nanzan was conquered in 1429 by Shō Hashi, it came under the control of the Ryukyu Kingdom.