Archeologists and historians hold that the first inhabitants of Indonesia were the Homo erectus who arrived in Java around 1.5 million years ago, who leave behind several fossilized remains.
The rise of Hinduism and Buddhism
Indonesia's indigenous people are the Austronesian people, who lived in tribal societies until many converted to Hinduism and Buddhism through trade with sailors from India. Their oldest Hindu kingdom, Yawadvipa, can be traced back as far as 200 BCE. Another kingdom, Srivijaya, is a powerful Buddhist kingdom dating back to the 7th Century CE.
In the 13th Century, a kingdom dubbed Majapahit rose from East Java to conquer most of the Malayan Peninsula, Java, Borneo, and Sumatra. Historical texts regard it as Indonesia's greatest empire and the period of Majapahit dominance is often referred to as a Golden Age in Indonesian history.
The Islamic kingdoms
At the dawn of the 14th Century, the influence of Majapahit declined greatly as Arab sailors converted many Hindus and Buddhists into Islam. The Sultanate of Malacca was founded in Sumatra and challenged Majapahit while also spreading Islamic faith to Indonesia's population. Islam grew to become Indonesia's majority religion as it is today as a result of the various Sultanates conquering former Hindu territories.
Dutch and Portuguese colonisation
Portuguese explorers arrived in the 1512 in search of rare spices to be sold in Europe and to convert the population into Catholicism. Portugal colonized Ternate, Maluku, and Mataram while clashing with the Muslim population.
Similarly, the Dutch East-India Company arrived in 1602 in search of land and spices, colonizing Java. Protestant missionaries spreading Protestant Christianity came with them, although their efforts were less successful compared to Catholic missionaries as they were not prioritized by their government. Remaining Islamic nobility in Sumatra and Java rose in multiple rebellions but were put down.
The Company became one of the richest ever in history until it was dissolved in 1800 following its bankruptcy after Netherlands' conflict with Napoleonic France.
The British East-India Company seized Java and established colonial rule until a treaty with a rebuilt Dutch Empire forces them to abandon their efforts.
The Dutch Empire
With the Company bankrupted, the East Indies fell under direct state rule by Netherlands. Prince Diponegoro of Central Java led a brief rebellion between 1825-1830, causing the Dutch to force harsher taxation terms on peasants and landowners, as well as establishing indentured labor.
With the Industrial Revolution, the cities of Batavia (now Jakarta) and Yogyakarta were modernised. Caste systems dividing Europeans, "Easterners" such as Chinese ethnic groups, and indigenous Indonesians were enforced.
The beginning of the 20th Century was marked with independence movements around the colony. An exiled Dutch socialist Henk Sneevliet formed the fledgling Indies Social Democratic Party, which would later evolve to become the Indonesian Communist Party in 1924.
Various strikes and revolt took place, causing the Dutch colonists to exile and imprison more than 4,500 activists including Indonesia's future founding father and first president, Sukarno.
World War II and Japanese occupation
With the war in Europe spinning out of control, Dutch colonial power weakened. Imperial Japan briefly neutralises the US Navy by attacking Pearl Harbor, allowing them to invade and occupy Indonesia, French Indochina, Papua New Guinea, and Malaysia.
Although Japanese occupation was marked with brutal torture and sex slavery, it only lasted between 1942-1945 at the defeat of both Nazi Germany and Imperial Japan.
At the conclusion of World War II, Allied troops consisting led by Admiral E.G. Mansergh and consisting of British Indian and Australian infantry as well as Dutch paratroopers arrived to dismantle the remaining Japanese fighters, liberate and reestablish Dutch colonial power in Indonesia.
However, Sukarno and his nationalist supporters declared independence in August 17, 1945. The Dutch maneuvered politically and fought to keep the colony.
The Indonesian National Revolution lasted until December 1949. It was marked with the desertion of 600 Indian troopers and the United States influencing the Dutch into a bitter political loss of Indonesia, fearing the rise of militant Communism under the premise of Europhobia.