Kyoto had been the largest city in Japan until the Kanei era when the population of Edo increased sharply owing to the introduction of Sankinkotai (shogunate scheme requiring feudal lords to stay in residence in Edo every other year).
参勤交代で江戸の人口が急増する寛永年間まで京都は日本最大の都市であった。