Nakagusuku Castle is a gusuku in the village of Kitanakagusuku, Okinawa, Japan. It is one of a number of castles built on the island of Okinawa by the Ryukyu Kingdom now in ruins. The legendary Ryukyuan commander, Gosamaru, built the fortress in the early 15th century to defend against attacks from the east by Lord Amawari of Katsuren Castle. Amawari attacked the castle in 1458 and defeated Gosamaru shortly before his own castle was attacked by Uni-Ufugusuku. The castle was visited by Commodore Matthew C. Perry in 1853, who noted that the walls seemed to be designed to absorb cannon fire. The six courtyards of this fortress with stacked stone walls make it a prime example of a gusuku. It was added to the list of UNESCO World Heritage Sites in 2000. It is regarded as one of the 100 most famous castles in Japan. Less than 50 metres away from the castle is the Nakagusuku Hotel ruins.