On 31 March 1854, Commodore Matthew Perry and the “Black Ships” of the United States Navy forced the opening of Japan to the outside world with the Convention of Kanagawa. Subsequent similar treaties with Western countries in the Bakumatsu period brought economic and political crises. The resignation of the shogun led to the Boshin War and the establishment of a centralized state nominally unified under the Emperor (the Meiji Restoration).
Adopting Western political, judicial and military institutions, the Cabinet organized the Privy Council, introduced the Meiji Constitution, and assembled the Imperial Diet. The Meiji Restoration transformed the Empire of Japan into an industrialized world power that pursued military conflict to expand its sphere of influence. After victories in the First Sino-Japanese War (1894–1895) and the Russo-Japanese War (1904–1905), Japan gained control of Taiwan, Korea, and the southern half of Sakhalin. Japan’s population grew from 35 million in 1873 to 70 million in 1935.
The early 20th century saw a brief period of “Taisho democracy” overshadowed by increasing expansionism and militarization. World War I enabled Japan, on the side of the victorious Allies, to widen its influence and territorial holdings. It continued its expansionist policy by occupying Manchuria in 1931; as a result of international condemnation of this occupation, Japan resigned from the League of Nations two years later. In 1936, Japan signed the Anti-Comintern Pact with Nazi Germany, and the 1940 Tripartite Pact made it one of the Axis Powers. In 1941, Japan negotiated the Soviet–Japanese Neutrality Pact.
The Empire of Japan invaded other parts of China in 1937, precipitating the Second Sino-Japanese War (1937–1945). The Imperial Japanese Army swiftly captured the capital Nanjing and conducted the Nanking Massacre. In 1940, the Empire then invaded French Indochina, after which the United States placed an oil embargo on Japan. On 7 December 1941, Japan attacked the US naval base at Pearl Harbor and declared war, bringing the US into World War II. After the Soviet invasion of Manchuria and the atomic bombings of Hiroshima and Nagasaki in 1945, Japan agreed to an unconditional surrender on 15 August. The war cost Japan and the rest of the Greater East Asia Co-Prosperity Sphere millions of lives and left much of the nation’s industry and infrastructure destroyed. The Allies (led by the US) repatriated millions of ethnic Japanese from colonies and military camps throughout Asia, largely eliminating the Japanese empire and restoring the independence of its conquered territories. The Allies also convened the International Military Tribunal for the Far East on 3 May 1946 to prosecute some Japanese leaders for war crimes. However, the bacteriological research units and members of the imperial family involved in the war were exonerated from criminal prosecutions by the Supreme Allied Commander despite calls for trials for both groups.
In 1947, Japan adopted a new constitution emphasizing liberal democratic practices. The Allied occupation ended with the Treaty of San Francisco in 1952 and Japan was granted membership in the United Nations in 1956. Japan later achieved rapid growth to become the second-largest economy in the world, until surpassed by China in 2010. This ended in the mid-1990s when Japan suffered a major recession. In the beginning of the 21st century, positive growth has signaled a gradual economic recovery. On 11 March 2011, Japan suffered the strongest earthquake in its recorded history; this triggered the Fukushima Daiichi nuclear disaster, one of the worst disasters in the history of nuclear power.