The article examines the ideology of the leader of the Mahdist uprising in Sudan at the end of the 19th century, Muhammad Ahmad, who took the title al-Mahdi. The role of elements of Wahhabism, as well as the teachings of Sufi brotherhoods spread in the territory of Sudan, on the ideology of the Mahdists is revealed. Conclusions reached during the study: 1) Muhammad Ahmad's ideology was influenced by the Sufi orders of Senusiyya and Sammaniyya, as well as early Wahhabism; 2) a significant part of the tenets of the Senussi was also drawn from Wahhabism by them; 3) the influence of Wahhabism on the ideology of the Mahdists was much greater than was commonly believed in Soviet and Russian historiography; 4) at the same time, the Wahhabi influence was indirect, since it used methods of Sufism that were close and understandable to the population of Sudan to spread. © 2021 Ltd "Integration: Education and Science". All rights reserved.