It is generally believed that the earliest inhabitants of the Indonesian archipelago were of Indian or Burmese origin. Later migrants known as Malays came from Southern China and Indochina at around 3000 BC. By the end of 7th Century, powerful groups such as Buddhist Srivijaya Empire and the Hindu Mataram kingdom developed in Java and Sumatra. In the 13th Century, there were witness of the rise of Hindu Majapahit Empire in East Java, which united the whole of what is now modern day Indonesia and parts of the Malay Peninsula. The subsequent spread of Islam into the archipelago in the 14th century forced the Majapahits to retreat to Bali in the 15th century.
By this time, a strong Muslim empire had developed with its centre at Malacca on the Malay Peninsula. Its influence was short lived and it fell to the Portuguese in the year 1511. Later, in the middle of 16th century, Dutch displaced the Portuguese and began making inroads into Indonesia. The Dutch East India Company based in Jakarta dominated the spice trade and the Dutch took over the occupation of Indonesia for about 350 years. The Dutch East Indies, as Indonesia was known at that time, fell under British rule for the period of 1811-1816. Later on burgeoning nationalism combined with Japanese occupation of Indonesia to weaken the Dutch resolve during World War II, and they finally transferred sovereignty to the new Indonesian republic in 1949. Achmed Sukarno who is the leader of the freedom struggle- became the first President of Indonesia.