Bali is a Hindu island in the middle of a predominately Muslim country. At one stage much of Indonesia was Hindu and the Majapahit empire, was eventually taken over , in 1515, by the Muslim Mataram empire. Why was Bali not taken over and how did it stay Hindu, when islands to the east, including Lombok, become Muslim?
There are a couple of answers to this question. The first would be that Balinese Agama Hindu, is an intense religion, one that incorporates animism, the worshipping of local geographic points (mountains, river ) and that involves the worship of ones ancestors. Giving this up isn’t easy.
The second reason was that the spread of Islam follow trade routes and Bali doesn’t have a good deep water port. Others islands that were more accessible, became Muslim. The last major reason is one I particularly like. It involves the dewa agung and Muslim missionaries. During the Hindu Majapahit empire, Muslim missionaries came to Bali to try to convert the population. They had little success, partly because the dewa agung, did not like the idea of circumcision. The missionaries told him the bamboo knife was so sharp he would feel no pain.
The dewa agung tried to cut his fingernails and then the hairs on his arms. Failing at both, he refused to let the knife neear the family jewels. The missionaries had failed and were to ashamed to return to Java. The dewa agung allowed them to stay in Bali, setting up Muslim villages in Gelgel and 2 other places.
Riding around Bali I have seen masjids (mosques) even in the most remote places, including near Jatiluwih and in Kintamani in the highlands.