As early as the first century CE Indonesian vessels made trade voyages as far as Africa. Picture: a ship carved on Borobudur, circa 800 CE.
Fossilized remains of Homo erectus, popularly known as the “Java Man”, suggest that the Indonesian archipelago was inhabited two million to 500,000 years ago. Austronesian people, who form the majority of the modern population, migrated to South East Asia from Taiwan. They arrived in Indonesia around 2000 BCE, and confined the native Melanesian peoplesto the far eastern regions as they expanded. Ideal agricultural conditions, and the mastering of wet-field rice cultivation as early as the eighth century BCE, allowed villages, towns, and small kingdoms to flourish by the first century CE. Indonesia’s strategic sea-lane position fostered inter-island and international trade. For example, trade links with both Indian kingdoms and China were established several centuries BCE. Trade has since fundamentally shaped Indonesian history. 
The nutmeg plant is native to Indonesia’s Banda Islands. Once one of the world’s most valuable commodities, it drew the first European colonial powers to Indonesia.
From the seventh century CE, the powerful Srivijaya naval kingdom flourished as a result of trade and the influences of Hinduism and Buddhism that were imported with it.  Between the eighth and 10th centuries CE, the agricultural Buddhist Sailendraand Hindu Mataram dynasties thrived and declined in inland Java, leaving grand religious monuments such as Sailendra’s Borobudur and Mataram’s Prambanan. The Hindu Majapahitkingdom was founded in eastern Java in the late 13th century, and under Gajah Mada, its influence stretched over much of Indonesia; this period is often referred to as a “Golden Age” in Indonesian history. 
Although Muslim traders first traveled through South East Asia early in the Islamic era, the earliest evidence of Islamized populationsin Indonesia dates to the 13th century in northern Sumatra. Other Indonesian areas gradually adopted Islam, and it was the dominant religion in Java and Sumatra by the end of the 16th century. For the most part, Islam overlaid and mixed with existing cultural and religious influences, which shaped the predominant form of Islam in Indonesia, particularly in Java.  The first Europeans arrived in Indonesia in 1512, when Portuguese traders, led by Francisco Serrão, sought to monopolize the sources of nutmeg, cloves, and cubeb pepper in Maluku.  Dutch and British traders followed. In 1602 the Dutch established the Dutch East India Company (VOC) and became the dominant European power. Following bankruptcy, the VOC was formally dissolved in 1800, and the government of the Netherlands established the Dutch East Indies as a nationalized colony. 
For most of the colonial period, Dutch control over the archipelago was tenuous outside of coastal strongholds; only in the early 20th century did Dutch dominance extend to what was to become Indonesia’s current boundaries.  The Japanese invasion and subsequent occupation during World War II  ended Dutch rule, and encouraged the previously suppressed Indonesian independence movement. Two days after the surrender of Japan in August 1945, Sukarno, an influential nationalist leader, declared independence and was appointed president.  The Netherlands tried to reestablish their rule, and an armed and diplomatic struggle ended in December 1949, when in the face of international pressure, the Dutch formally recognized Indonesian independence  (with the exception of The Dutch territory of West New Guinea, which was incorporated following the 1962 New York Agreement, and UN-mandated Act of Free Choice).