Yes, Indonesia experienced several major periods of foreign domination before achieving independence.
Portuguese explorers arrived in the Maluku Islands (Spice Islands) seeking nutmeg, cloves, and mace. They established coastal forts and trading posts but never controlled large inland territories.
The Dutch East India Company (VOC) gradually became the dominant power, colonizing vast portions of the archipelago. After the VOC's dissolution in 1800, the Dutch government ruled the Dutch East Indies directly for over three centuries, exploiting resources and establishing plantation economies.
During World War II, Japan occupied Indonesia to secure oil, rubber, and strategic bases. The occupation was brutal, marked by forced labor (romusha), famine, and widespread atrocities.
Indonesia declared independence on August 17, 1945, days after Japan's surrender. The Dutch attempted to reassert control, sparking the Indonesian National Revolution. After four years of armed conflict and diplomatic pressure, the Netherlands formally recognized Indonesian sovereignty in December 1949.
These colonial eras profoundly shaped Indonesia's borders, legal system, language (Bahasa Indonesia emerged as a lingua franca), and demographic landscape. Since 1949, Indonesia has been a sovereign nation navigating its own political and social evolution.