A retainer of Mogami Yoshiaki, Tan Yosozaemon was ordered in 1581 to build a castle at Kaneyama, at the foot of the Ariya Pass dividing Mogami district from Akita's Ogachi district, as part of Yoshiaki's campaign against Onodera Yoshimichi. He subsequently garrisoned the castle as the front line against the Onodera clan of Senboku, repeatedly leading sorties in the skirmishes that frequently broke out near the Ariya Pass. The street layout of present-day central Kaneyama town in Mogami district, Yamagata, is said to date from his time developing the castle town.