In the Muromachi period, the Yagi-jo Castle was also built as Shugosho (governor's office) of the Hosokawa family appointed as Shugo (governor), in order to comprehensively administer the affairs of the entire area of Tanba Province.
室町時代にも守護細川家の守護所として八木城が築かれ、丹波一円の政務を総覧した。