最上氏
During the Muromachi period, the area was noted as a hot spring resort and a stronghold of the Mogami clan. It was a contested territory between the Mogami and the Date clans during the Sengoku period, and later between the Mogami and the Uesugi clan. After the destruction of the Mogami clan by the Tokugawa shogunate, Kamiyama Domain (40,000 "koku") was created in 1622 for Matsudaira Shigetada, who laid out the plan of the future castle town. The Matsudaira were replaced by the Gamō clan from 1626-1627, followed by the Toki clan from 1628-1691, and the Kanemori clan from 1692-1697.