Gosamaru, a heroic figure in the fifteenth century, built Nakagusuku Castle by adding to an old gusuku (castle) on the site. Every aspect of the fine castle is recognized as representative of a gusuku, including the construction of the enclosures, the shape of the castle gates, and the masonry technique. Gosamaru was a close ally of the king at Shurijo Castle, even marrying his daughter to the king, but committed suicide after coming under suspicion of treason. Subsequently, his descendants, the noted Mouji, served the king at Shurijo Castle. A Ryukyuan kumi-odori (dance play) created in the early eighteenth century was themed on Gosamaru and promoted the image of a loyal retainer.
In 2000, “Gusuku Sites and Related Properties of the Kingdom of Ryukyu” was registered under UNESCO World Heritage Site.