structural:expansion
Colonial era

The first Europeans arrived in the archipelago in 1512, when Portuguese traders, led by Francisco Serrão, sought to monopolise the sources of nutmeg, cloves, and cubeb pepper in the Maluku Islands. Dutch and British traders followed. In 1602, the Dutch established the Dutch East India Company (Verenigde Oostindische Compagnie; VOC) and became the dominant European power for almost 200 years. The VOC was dissolved in 1799 following bankruptcy, and the Netherlands established the Dutch East Indies as a nationalised colony.

For most of the colonial period, Dutch control over the archipelago was tenuous. Dutch forces were engaged continuously in quelling rebellions on and off Java. The influence of local leaders such as Prince Diponegoro in central Java, Imam Bonjol in central Sumatra, Pattimura in Maluku, and the bloody thirty-year Aceh War weakened the Dutch and tied up the colonial military forces. Only in the early 20th century did Dutch dominance extend to what was to become Indonesia's current boundaries.

During World War II, the Japanese invasion and occupation ended Dutch rule and encouraged the independence movement. Two days after the surrender of Japan in August 1945, influential nationalist leaders Sukarno and Mohammad Hatta issued the Proclamation of Indonesian Independence. Sukarno, Hatta and Sutan Sjahrir, were appointed president, vice-president and prime minister, respectively. The Netherlands attempted to re-establish their rule, beginning the Indonesian National Revolution which ended in December 1949 when the Dutch recognised Indonesian independence in the face of international pressure. Despite extraordinary political, social, and sectarian divisions, Indonesians, on the whole, found unity in their fight for independence.