Takayama used to be the castle town which General Nagachika Kanamori built on behalf of his master at the end of the Sengoku era when Hideyosi Toyotomi ruled Japan. In 1692, however, Hida district came under the direct control of the Tokugawa government, and almost all samurai left Takayama. So l’m told.