Under the isolationist Tokugawa Shogunate, Japan closed itself off from foreign influence in the early 1600s. However, in the 1850s growing Western imperialism in East Asia threatened Japan's independence. Japanese leaders opened the country to trade with foreign powers to modernize and avoid colonization. This led to the overthrow of the Tokugawa regime and the start of the Meiji Restoration period in 1868. During this period, Japan rapidly industrialized and transformed itself into a modern imperial power by adopting Western political, economic, and military institutions and technologies. It built new railroads, factories, and urban centers and became the first Asian power to defeat major European countries like China and Russia in war.