On 30 June 1989, a military coup overthrew the democratically elected government of al-Sadiq al-Mahdi in Sudan and replaced it with a fundamentalist Muslim dictatorship headed by Colonel ʿUmar Hasan al-Bashir and adhering to the radical Islamic ideology of the National Islamic Front (NIF), under the leadership of Dr. Hasan al-Turabi. Since June 1881 when Muhammad Ahmad ibn ʿAbdallah declared that he was the expected mahdī, the religious-political scene of Sudan had been largely dominated by Mahdists and Khatmiyya adherents. Even under colonial rule, in the years 1899–1955, Mahdism continued to flourish despite the fact that the British rulers treated it with suspicion and preferred Sayyid ʿAli al-Mirghani, leader of the more docile Khatmiyya Sufi order. The defeat of the Mahdist Umma Party in the first general elections in 1953, by a coalition of secularists and Khatmiyya supporters was only a temporary setback. After Sudan became independent, in 1956, Mahdist supremacy was challenged both by the Khatmiyya and other groups, but its mass support among the Ansar, a political Islamic movement, enabled them to gain control, except during brief periods when so-called secularists governed independent Sudan. This happened in 1953–56 when the Khatmiyya joined forces with the intelligentsia, and again between October 1964 and March 1965 when the country was governed by a secular, transitional, nonelected government that was ousted from power as soon as the sects regained control. Secularism also thrived briefly under the military dictatorship of Jaʿfar al-Numayri between 1969 and 1977.