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-1900s, outside pressures from Western powers and a desire for change led Japan to transform itself from a closed, feudal society into a major industrial and military world power through adopting Western ideas and institutions while maintaining independence. The Meiji government oversaw Japan's rapid modernization through industrialization, building infrastructure like railroads, expanding the military, and sending students abroad to learn from Europe. By the early 1900s, Japan had become an imperialist power that gained control of territories like Korea, Taiwan, and Manchuria.