The Republic of Indonesia was proclaimed on 17 August 1945 following the Japanese surrender at the end of the Second World War. However, it was not until December 1949, after almost 5 years of guerrilla warfare known as the Indonesian Revolution, that Indonesia officially achieved independence with the formal transfer of sovereignty from the Netherlands which had controlled parts of the East Indies archipelago since the 17th century. Today, Indonesia is the fourth most popular country in the world with some 242 million people. It is also the largest Muslim country with almost 86.1% of its population professing Islam.
There are six officially recognised religions in Indonesia: Islam, Hinduism, Buddhism, Catholicism, Protestantism and Confucianism. Buddhism and Hinduism in the archipelago date back to the 1st century. Islam spread to Indonesia in the 13th century through Arab and Indian Muslim merchants who had already established trade routes to China. Christianity was first introduced in the Moluccas, the Spice Islands, by the Portuguese in the 16th century, while Dutch Reform Protestantism came with the Dutch East India Company (VOC) in the 17th century. In addition to these religions the archipelago abounded with a variety of local traditional beliefs including forms of shamanism, animism and dualism, many of which are still practised today.
Islam replaced Hinduism as the largest religion with the rise of the Javanese Muslim Majapahit kingdom at the end of the 13th century, leaving the island of Bali as the only Hindu stronghold. However, Islam did not spread equally across all islands in the archipelago. Nor was Islam practised uniformly. Thus a distinct religious geography emerged whereby western Indonesia with the populous islands of Sumatra and Java was predominantly Muslim whereas the more sparsely populated eastern Indonesian islands had a predominantly Christian and animist population. Moreover, more orthodox forms of Islam were practised along the coast and in areas which had historically attracted Arab traders and migrants especially from the Hadramaut (Yemen), while more syncretistic forms of Islam were practised in the interior, especially in Java where Islam incorporated elements of previous Hindu and traditional beliefs. Islam was also more orthodox in those parts of Sumatra which had seen Wahabi influences in the 19th century and in Aceh which had a long and glorious Islamic history dating back to the 17th century Sultan Iskandar Muda and which even today is known as the Verandah of Mecca.