The country shares land borders with Papua New Guinea, East Timor, and the eastern part of Malaysia.
Other neighbouring countries include Singapore, Vietnam, the Philippines, Australia, Palau, and India's Andaman and Nicobar Islands.
Indonesian history has been influenced by foreign powers drawn to its natural resources.
Muslim traders and Sufi scholars brought the now-dominant Islam, while European powers brought Christianity and fought one another to monopolise trade in the Spice Islands of Maluku during the Age of Discovery.
The Hindu Majapahit kingdom was founded in eastern Java in the late 13th century, and under Gajah Mada, its influence stretched over much of present-day Indonesia.
Other Indonesian areas gradually adopted Islam, and it was the dominant religion in Java and Sumatra by the end of the 16th century.
Indonesia's economy is the world's 16th largest by nominal GDP and the 7th largest by GDP at PPP.
Indonesia is a member of several multilateral organisations, including the UN, WTO, IMF and G20 major economies.
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 regular contact between Europeans and the peoples of the archipelago began in 1512, when Portuguese traders, led by Francisco Serrão, sought to monopolise the sources of nutmeg, cloves, and cubeb pepper in Maluku. In 1602, the Dutch established the Dutch East India Company (VOC), and in the following decades, the Dutch gained a foothold in Batavia and Amboina.
Throughout the 17th and 18th centuries, the company became the dominant European power in the archipelago.