Yarazamori Castle was built on the southern mouth of Naha Port in 1546 by King Shō Sei. It was built to defend the Port and city of Naha, alongside its sister Mie Castle. Between the two castles, an iron chain boom-net could be drawn up to deny ships access to the harbor. Yarazamori Castle, the larger of the two, was armed with 7-9cm cannons. The defenders were also armed with pikes and native-made hand cannons. These defenses were intended for use against pirates, however they also proved successful in driving away the fleet of Satsuma during their 1609 invasion, where Yarazamori proved pivotal. The castle would continue to be used for anti-piracy, however it became generally used for seeing ships off by civilians.