Because of its strategic geographic position, the area around Morioka had been regarded as the center of northern Ōshū since the construction of nearby Shiwa Castle by the Yamato dynasty in the early Heian period. The area was later contested between the Abe clan and the Kiyohara clan in the Former Nine Years War, and it is believed that the first fortification had been erected on this site by the Kiyohara clan. The Kiyohara were destroyed by the Northern Fujiwara of Hiraizumi, who in turn were destroyed by the Minamoto clan of the Kamakura shogunate. The area then came under the control of the Kudō clan, who were retainers of the Minamoto. During the Muromachi period, the Kudō clan was weakened by internal conflict between supporters of Emperor Go-Daigo and the Southern Court and supporters of the Ashikaga shogunate and the Northern Court, and were thus displaced by the Nanbu clan, who had already been established to the north.