<P> Tokugawa Ieyasu served as regent for Hideyoshi's son and used his position to gain political and military support . When open war broke out, Ieyasu defeated rival clans in the Battle of Sekigahara in 1600 . Tokugawa Ieyasu was appointed shōgun by Emperor Go - Yōzei in 1603 and established the Tokugawa shogunate in Edo (modern Tokyo). The shogunate enacted measures including buke shohatto, as a code of conduct to control the autonomous daimyōs; and in 1639 the isolationist sakoku ("closed country") policy that spanned the two and a half centuries of tenuous political unity known as the Edo period (1603--1868). The study of Western sciences, known as rangaku, continued through contact with the Dutch enclave at Dejima in Nagasaki . The Edo period also gave rise to kokugaku ("national studies"), the study of Japan by the Japanese . </P> <P> On March 31, 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 shōgun led to the Boshin War and the establishment of a centralized state nominally unified under the Emperor (the Meiji Restoration). </P> <P> Plunging itself through an active process of Westernization during the Meiji Restoration in 1868, Japan adopted Western political, judicial and military institutions and Western cultural influences integrated with its traditional culture for modern industrialization . 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 . </P> <P> World War I enabled Japan, on the side of the victorious Allies, to widen its influence and territorial holdings in Asia . The early 20th century saw a brief period of "Taishō democracy (1912--1926)" but the 1920s saw a fragile democracy buckle under a political shift towards fascism, the passing of laws against political dissent and a series of attempted coups . The subsequent "Shōwa period" initially saw the power of the military increased and brought about Japanese expansionism and militarization along with the totalitarianism and ultranationalism that are a part of fascist ideology . In 1931 Japan invaded and occupied Manchuria and following international condemnation of this occupation, Japan resigned from the League of Nations in 1933 . In 1936, Japan signed the Anti-Comintern Pact with Germany and the 1940 Tripartite Pact made it one of the Axis Powers . In 1941, following its defeat in the brief Soviet--Japanese Border War, Japan negotiated the Soviet--Japanese Neutrality Pact, which lasted until 1945 with the Soviet invasion of Manchuria . </P>

When was japan established with its current name