While Chinese rulers were coping with the dual problems of external threat and internal instability, similar developments were taking place in Japan. An agricultural society like its powerful neighbor, Japan had borrowed extensively from Chinese civilization for more than a millennium; its political institutions, religious beliefs, and cultural achievements all bore the clear imprint of the Chinese model. Nevertheless, throughout the centuries, the Japanese were able to retain not only their political independence but also their cultural uniqueness and had created a civilization quite distinct from those elsewhere in the region. One reason for the historical differences between China and Japan is that China is a large continental country and Japan a small island nation. Proud of their own considerable cultural achievements and their dominant position throughout the region, the Chinese have traditionally been reluctant to dilute the purity of their culture with foreign innovations. Often subject to invasion by nomadic peoples from the north, the Chinese viewed culture rather than race as a symbol of their sense of identity. By contrast, the island character of Japan probably had the effect of strengthening the Japanese sense of ethnic and cultural distinctiveness. Although the Japanese self-image of ethnic homogeneity may not be entirely justified, it enabled them to import ideas from abroad without the risk of destroying the uniqueness of their own culture. As a result, although the Japanese borrowed liberally from China over the centuries, they turned Chinese ideas and institutions to their own uses. In contrast to China, where a centralized and authoritarian political system was viewed as crucial to protect the vast country from foreign conquest or internal fractionalization, a decentralized political system reminiscent of the feudal system in medieval Europe held sway in Japan under the hegemony of a powerful military leader, or shogun, who ruled with varying degrees of effectiveness in the name of the hereditary emperor. This system lasted until the early seventeenth century, when a strong shogunate called the Tokugawa rose to power after a protracted civil war. The Tokugawa shogunate managed to revitalize the traditional system in a somewhat more centralized form that enabled it to survive for another 250 years. One of the many factors involved in the rise of the Tokugawa was the impending collapse of the old system. Another was contact with the West, which had begun with the arrival of Portuguese ships in Japanese ports in the middle of the sixteenth century. Japan initially opened its doors eagerly to European trade and missionary activity, but later Japanese elites became concerned at the corrosive effects of Western ideas and practices and attempted to evict the foreigners. For the next two centuries, the Tokugawa adopted a policy of “closed country” (to use the contemporary Japanese phrase) to keep out foreign ideas and protect native values and institutions. In spite of such efforts, however, Japanese society was changing from within and by the early nineteenth century was quite different from what it had been two cen turies earlier. Traditional institutions and the feudal aristocratic system were under increasing strain, not only from the emergence of a new merchant class but also from the centralizing tendencies of the powerful shogunate. Some historians have noted strong parallels between Tokugawa Japan and early modern Europe, which gave birth to centralized empires and a strong merchant class during the same period. Certainly, there were signs that the shogunate system was becoming less effective. Factionalism and corruption plagued the central bureaucracy. Feudal lords in the countryside (known as daimyo, or “great names”) reacted to increasing economic pressures by intensifying their exactions from the peasants who farmed their manor holdings and by engaging in manufacturing and commercial pursuits, such as the sale of textiles, forestry products, and sake ( Japanese rice wine). As peasants were whipsawed by rising manorial exactions and a series of poor harvests caused by bad weather, rural unrest swept the countryside. Japan, then, was ripe for change. Some historians maintain that the country was poised to experience an industrial revolution under the stimulus of internal conditions. As in China, the resumption of contacts with the West in the middle of the nineteenth century rendered the question somewhat academic. To the Western powers, the continued isolation of Japanese society was an affront and a challenge. Driven by growing rivalry among themselves and convinced by their own propaganda and the ideology of world capitalism that the expansion of trade on a global basis would benefit all nations, Western nations began to approach Japan in the hope of opening up the hermit kingdom to foreign economic interests. The first to succeed was the United States. American whalers and clipper ships following the northern route across the Pacific needed a fueling station before completing their long journey to China and other ports in the area. The first efforts to pry the Japanese out of their cloistered existence in the 1830s and 1840s failed, but the Americans persisted. In the summer of 1853, an American fleet of four warships under Commodore Matthew C. Perry arrived in Edo Bay (now Tokyo Bay) with a letter from President Millard Fillmore addressed to the shogun (see the box above). A few months later, Japan agreed to the Treaty of Kanagawa, providing for the opening of two ports and the establishment of a U.S. consulate on Japanese soil. In 1858, U.S. Consul Townsend Harris signed a more elaborate commercial treaty calling for the opening of several ports to U.S. trade and residence, an exchange of ministers, and extraterritorial privileges for U.S. residents in Japan. The Japanese soon signed similar treaties with several European nations. The decision to open relations with the Western barbarians was highly unpopular in some quarters, particularly in regions distant from the shogunate headquarters in Edo. Resistance was especially strong in two of the key outside daimyo territories in the south, Satsuma and Choshu, both of which had strong military traditions. In 1863, the “Sat-Cho” alliance forced the hapless shogun to promise to bring relations with the West to an end, but the rebellious groups soon disclosed their own weakness. When Choshu troops fired on Western ships in the Strait of Shimonoseki, the Westerners fired back and destroyed the Choshu fortifications. The incident convinced the rebellious samurai (“retainers,” the traditional warrior class) of the need to strengthen their own military and intensified their unwillingness to give in to the West. Having strengthened their influence at the imperial court in Kyoto, they demanded the resignation of the shogun and the restoration of the power of the emperor. In January 1868, rebel armies attacked the shogun’s palace in Kyoto and proclaimed the restored authority of the emperor. After a few weeks, resistance collapsed, and the venerable shogunate system was brought to an end.