Islam as the first foreign religion arrived in Uganda from the north at the dawn of 18th century and spread through inland networks of the East African coastal trade by the mid nineteenth century. Islam was first taught in the Kingdom of Buganda in the year 1844 during the reign of Kabaka Suuna II. It was taught by the Arab/Swahili people from Zanzibar on the East African Coast. However while Kabaka Suuna allowed Arab/Swahili preachers to teach Islam at his court, he himself did not convert to Islam nor did he encourage it to be taught outside his court. However, he is reported to have learnt portions of the Quran.
Suuna’s son and successor, Kabaka Mutesa I, took more interest in the religion. Its teaching greatly appealed to him, and he converted to Islam. He learnt the Arabic language and mastered the Quran. He also directed his chiefs and relatives to study it; his palace at Banda on the outskirts of Kampala became an Islamic Education Centre. When Christian Missionaries arrived in Uganda in 1877, they challenged the monopoly of Islam by teaching Mutesa an alternative world religion. The religious atmosphere began to slowly change, and continued to change until the Christians gained the upper hand. The Christians gained converts, and also taught general skills that were to prove vital later in the management of society. They also gave military assistance to their converts, and hence turned the power against the Muslims. Ironically however, it was the military defeat that the Muslims suffered which enhanced the spread of Islam to other parts of the country. The Muslims who fled to different parts of the country began teaching Islam and acquiring converts. The coming of Islam to northern Uganda occurred at about the same time as it did in Buganda. The Egyptian ivory traders who moved across Sudan after the death of Muhammad Ali (early 19th century leader of Egypt) in 1849 came as far south as Acholi, Lango, Bunyoro and West Nile (in northern and north western Uganda); and as they proceeded with their trading activities, they also converted some locals to Islam. At about this time also, Nubian soldiers under the command of Emin Pasha were stationed in northern Uganda. In 1884, Muhammad Ahmad the Mahdi took control of Northern Sudan, and cut off Emin Pasha and his soldiers. The vast majority of the soldiers settled in the area and mingled with the local population. Although Pasha was Christian, his soldiers were Muslims, and they largely constitute the ancestry of the Muslims in the West Nile region today.
Following the Sudanese mutiny of the 1890s, many Muslim Sudanese soldiers crossed into what is today called Uganda. They moved across the Acholi-Lango area, and settled among the Madi, Lugbara and Kakwa and converted many of them to Islam. Some of these soldiers were later brought to Buganda to help the Christians and colonial government to fight the Muslims during the inter-religious wars of the early 1890s. When they realised they had been brought to fight their fellow Muslims, they refused to fight, and settled in the area of Bombo (20 miles North West of Kampala). Today, the Bombo area is one of the most Islamized parts of Buganda. Later, following their defeat in the religious wars, many Muslims were settled in the county of Butambala (30 miles south of Kampala).Islam continued to slowly spread to different parts of the country both from Buganda and from the north. The Muslim community in Uganda, which is spread all over the country, is the result of this disjointed process. (Ref. Islam in Uganda: A Situational report by Dr. Abasi kiyimba).