The archipelago was once largely under the control of Buddhist and Hindu rulers. By around the 7th century, a Buddhist kingdom arose on Sumatra and expanded into Java and the Malay Peninsula until it was conquered in the late 13th century by the Hindu Majapahit Empire from Java. Majapahit (1290-1527) united most of modern-day
Indonesia and
Malaysia. Traders introduced Islam around the 11th century, and the religion was gradually over the next 500 years. The Portuguese conquered parts of
Indonesia in the 16th century, but the Dutch ousted them (except in East Timor) and began colonizing the islands in the early 17th century. It would be the early 20th century before Dutch colonial rule was established across the entirety of what would become the boundaries of the modern Indonesian state.
Japan occupied the islands from 1942 to 1945.
Indonesia declared its independence shortly before
Japan's surrender, but it required four years of sometimes brutal fighting, intermittent negotiations, and UN mediation before the
Netherlands agreed to transfer sovereignty in 1949. A period of sometimes unruly parliamentary democracy ended in 1957 when President SOEKARNO declared martial law and instituted "Guided Democracy." After an abortive coup in 1965 by alleged communist sympathizers, SOEKARNO was gradually eased from power. From 1967 until 1998, President SUHARTO ruled
Indonesia with his "New Order" government. After street protests toppled SUHARTO in 1998, free and fair legislative elections took place in 1999 while the country's first direct presidential election occurred in 2004.
Indonesia has since become a robust democracy, holding four direct presidential elections, each considered by international observers to have been largely free and fair.
Indonesia is now the world's third-most-populous democracy and the world's largest Muslim-majority nation. It has had strong economic growth since overcoming the Asian financial crisis of the late 1990s. By the 2020s, it had the largest economy in Southeast Asia, and its economy ranked in the world's top 10 in terms of purchasing power parity. It has also made considerable gains in reducing poverty. Although relations amongst its diverse population--there are more than 300 ethnic groups--have been harmonious in the 2000s, there have been areas of sectarian discontent and violence, as well as instances of religious extremism and terrorism. A political settlement to an armed separatist conflict in Aceh was achieved in 2005, but a separatist group in Papua continued to conduct a low-intensity conflict as of 2024.