Niwa clan
Under the Tokugawa shogunate, the castle was briefly assigned to the Matsushita clan, a branch of the Gamō clan until 1627. The territory was then assigned to Kato Yoshiakira, one of the heroes of the Battle of Shizugatake and builder of Matsuyama Castle in Iyo Province. In 1643, the Niwa clan was transferred to become "daimyō" of Nihonmatsu Domain. The Niwa abandoned the old fortifications at the top of the hill, and completely rebuilt the castle at its base, from which they ruled until the Meiji restoration.