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. Homo sapiens reached the region by around 45,000 years ago. Austronesian peoples, who form the majority of the modern population, migrated to South East Asia from Taiwan. They arrived in Indonesia around 2000 BCE, and as they spread through the archipelago, confined the native Melanesian peoples to the far eastern regions.
Ideal agricultural conditions, and the mastering of wet-field rice cultivation as early as the 8th century BCE, allowed villages, towns, and small kingdoms to flourish by the 1st century CE. Indonesia’s strategic sea-lane position fostered inter-island and international trade, including links with Indian kingdoms and China, which 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 7th 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 Sailendra and Hindu Mataram dynasties thrived and declined in inland Java, leaving grand religious monuments such as Sailendra's Borobudur and Mataram's Prambanan.
The Hindu Majapahit kingdom was founded in eastern Java in the late 13th century, and under Gajah Mada, its influence stretched over much of Indonesia. Although Muslim traders first traveled through South East Asia early in the Islamic era, the earliest evidence of Islamized populations in 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. Despite major internal political, social and sectarian divisions during the National Revolution, Indonesians, on the whole, found unity in their fight for independence. Japanese 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 into Indonesia following the 1962 New York Agreement, and the UN-mandated Act of Free Choice of 1969). Sukarno, Indonesia's founding president Sukarno moved from democracy towards authoritarianism, and maintained his power base by balancing the opposing forces of the military and the Communist Party of Indonesia (PKI).
An attempted coup on 30 September 1965 was countered by the army, who led a violent anti-communist purge, during which the PKI was blamed for the coup and effectively destroyed.Between 500,000 and one million people were killed. The head of the military, General Suharto, out-maneuvered the politically weakened Sukarno, and was formally appointed president in March 1968. His New Order administration was supported by the US government, and encouraged foreign direct investment in Indonesia, which was a major factor in the subsequent three decades of substantial economic growth. However, the authoritarian "New Order" was widely accused of corruption and suppression of political opposition. Indonesia was the country hardest hit by the late 1990s Asian Financial Crisis.This increased popular discontent with the New Order and led to popular protest across the country.
Suharto resigned on 21 May 1998.In 1999, East Timor voted to secede from Indonesia, after a twenty-five-year military occupation that was marked by international condemnation of repression of the East Timorese.Since Suharto's resignation, a strengthening of democratic processes has included a regional autonomy program, and the first direct presidential election in 2004.
Political and economic instability, social unrest, corruption, and terrorism slowed progress, however, in the last five years the economy has performed strongly. Although relations among different religious and ethnic groups are largely harmonious, sectarian discontent and violence has occurred. A political settlement to an armed separatist conflict in Aceh was achieved in 2005.