The Tokugawa shogunate ruled from Edo, today’s Tokyo. Under alternate attendance, each daimyo spent every other year in Edo, and his wife and heir lived there permanently. The cost of the processions and two households kept the lords busy, short of money and loyal.
From the 1630s the shogunate banned Christianity, forbade Japanese to travel abroad and allowed only the Dutch among Europeans to trade, confined to the small artificial island of Dejima in Nagasaki harbour. Trade continued with China, Korea, the Ryukyu kingdom and the Ainu through tightly controlled routes.


Peace let cities grow. By the 18th century Edo probably had around a million people, one of the largest cities in the world. Merchants were officially at the bottom of the social order but grew rich, and they paid for a new urban culture: kabuki theatre, ukiyo-e woodblock prints and the poetry of Matsuo Bashō (haiku poet).


In 1853 four American warships under Commodore Matthew Perry (US commodore of the black ships) entered Edo Bay and demanded that Japan open its ports. The shogunate signed a treaty in 1854 and more unequal treaties in 1858. Many samurai, especially from the Satsuma and Chōshū domains, saw the shogunate as weak, and in 1867 the last shogun, Tokugawa Yoshinobu, handed power back to the emperor.
