Muhammad Darwis ( Ihsan Tarore ) is a youth in 19th @-@ century Kauman , Yogyakarta , and the son of Kyai Abubakar , the imam of the area 's mosque . Displeased with the mixture of Islam and animistic Javanese mysticism , which lead to poor Javanese spending exorbitant amounts of money on religious ceremonies , Darwis decide to go on the hajj to Mecca in Saudi Arabia . While there , he study what he consider the true form of Islam over a period of five years .