Under the Tokugawa shogunate in the early 1600s, Japan pursued a policy of isolationism, expelling foreigners and prohibiting the Japanese from leaving. However, in the 1800s, outside powers like Britain threatened Japan militarily. Japanese leaders opened the country to trade and Western influence to modernize. This led to the overthrow of the Tokugawa rulers and the start of the Meiji period. During the Meiji restoration from 1860 to 1900, Japan transformed rapidly into an industrial and military power by selectively adopting Western ideas while maintaining independence.