The Dutch presence at Nagasaki was small and the shogunate did its best to learn nothing from them. Although several people, both Japanese and foreign (Dutch) warned of the danger posed by the West, the Bakufu for a long time turned a deaf ear. Seeing what was happening to China, however, the Japanese in the know could not help but feel on the defensive, and rightly so. But what form should the defense take? After a few "incidents" (naval bombardments of towns, raiding parties sacking towns and destroying coastal defenses) it was obvious to the people in the ports that Japan could not hope to compete militarily with the West, but the more remote and sheltered Imperial court believed (was told) otherwise and pressured the government to repel the foreigners. In the middle were the moderates who advocated learning from the foreigners in order to control them and ultimately expell them with their own technology. As more and more European and American ships entered Japanese waters and tried to enter Japanese ports, the government was put into the precarious position of having to try to keep the barbarians out with nothing but words. Finally, they could delay no longer and in 1854 gave in to Commodore Perrys demand for a treaty. This opened the door for every other country and soon the foreigners had their own areas in a handful of Japanese port cities. The enemies of the government loved this state of affairs and took full advantage of it. Two of the largest, most powerful tozama han, Satsuma and Choshu, joined forces. By manipulating the Imperial court and general anger at the treaties, they managed to force the Shogun Keiki to "voluntarily" restore power to the Emperor Meiji (a teenager at the time). Even after the Emperor accepted this show of loyalty, the Tokugawa clan was still the largest landowner and most powerful family in the country. This was not acceptable to Satsuma and Choshu (among others), who managed to heap insult upon insult until the Tokugawa finally responded with force and were branded traitors. A very short civil war followed in which the peasant conscript Imperial Army (read Satsuma-Choshu Army) armed with rifles and canon easily destroyed the Tokugawas sword-bearing samurai army. Thus did the Tokugawa period end in 1868.
The new government was composed of young samurai who "advised" the Emperor Meiji. My next article will deal with the extraordinary period of "modernization" that took place under the new government. During the Meiji period, Japan catches up with the West for the first time and becomes a major power.