# Ansar–Khatmiyya rivalry

The Ansar–Khatmiyya rivalry, also known as al-Mahdi and al-Mirghani rivalry or the Two Sayyids rivalry, was a sectarian division in Sudan that shaped the country's political landscape after the end of the Mahdist State in 1899 and until the Kizan era in 1989.
The rivalry between the Ansar and Khatmiyya sects in Sudan dates back to the 19th century under Turco-Egyptian rule, which saw the rise of politically driven religious movements in Sudan. The Ansar, followers of Muhammad Ahmad al-Mahdi, established the Mahdist State in 1885, which was later overthrown in 1899 by Anglo-Egyptian forces. Meanwhile, the Khatmiyya sect, founded by Mohammed Uthman al-Mirghani al-Khatim in 1817, maintained close ties with Egyptian rulers and received colonial support.
During Sudan’s colonial period, the British used both groups to manage the country, but tensions arose due to their differing visions for Sudan’s future. The Ansar, led by Sayyid Abdul Rahman al-Mahdi, advocated for "Sudan for the Sudanese" and independence, while the Khatmiyya, led by Sayyid Ali al-Mirghani, supported unity with Egypt under the "Unity of the Nile Valley" slogan. These divisions deepened during Sudan's independence movement, with the Ansar aligning with the Umma Party and the Khatmiyya backing the National Unionist Party (NUP), later the Democratic Unionist Party (DUP).
Post-independence, their rivalry shaped Sudan's political landscape, contributing to political instability, coups, and factionalism. Both groups faced suppression during authoritarian regimes, especially under Gaafar Nimeiry and Omar al-Bashir. In modern times, their influence has waned, with divisions within their political wings limiting their role in Sudanese politics.

## History
### Ansar and Khatmiyya inception

Under the Turco-Egyptian rule, Sudan saw the rise of politically driven religious movements. This was highlighted by the Mahdist Uprising in 1843, led by Muhammad Ahmad "al-Mahdi" against the Turco-Egyptian rule. After liberating Khartoum and killing General Charles Gordon, the Mahdist state was established in 1885. Despite its defeat by British forces in 1899, the movement's influence persisted with its followers known as "Ansar." Ansar were based in Aba Island, and were popular in Darfur (western part of Sudan).
In 1899, after the fall of the Mahdist State the British government placed restrictions on the movements and activity of the Mahdi's son, Sayyid Abdul Rahman al-Mahdi. However, he soon emerged as the leader of the Ansar. Throughout most of the colonial era of Anglo-Egyptian Sudan, the British government considered him important as a moderate leader of the Mahdists.
In the early 1920s, from 5,000 to 15,000 pilgrims were coming to Aba Island each year to celebrate Ramadan. Many of them identified Abd al-Rahman with the prophet Isa, the Islamic interpretation of Jesus and assumed that he would drive the white Christian colonists out of Sudan. The British government found that Abd al-Rahman was in correspondence with agents and leaders in Nigeria and Cameroon, predicting the eventual victory of the Mahdists over the Christians. They blamed him for unrest in these colonies. After pilgrims from West Africa held mass demonstrations on Aba Island in 1924, the Sayyid was told to put a stop to the pilgrimages.
Conversely, during the Turco-Egyptian rule in Sudan, the "Khatmiyya," established by Muhammad Othman al-Mirghani al-Khitmi in 1817, received support and annual endowment from the Turco-Egyptian and British-Egyptian governments. Khatmiyya were based in Kassala, and were popular in the eastern part of Sudan with close ties to Egypt.
Both the Khatmiyya and Ansar received honorary titles and support from the British administration, however, the Ansar leaders resented the Khatmiyya being part of the political landscape in Sudan. Khatmiyya warned that this resentment might lead to civil war.

### The struggle for Sudan's independence

Following the creation of Graduates' Club, which opened its doors in Omdurman on 18 May 1918 under the supervision of the Gordon Memorial College, politically inclined members sought to expand its role into a platform for nationalist discourse and resistance against the Anglo-Egyptian colonial rule. Discussions at the club often centred on Sudan's political future, fostering debates that eventually led to the formation of two ideological factions with distinct visions for Sudan's path to independence.
The first faction promoted the idea of "Sudan for the Sudanese," inspired by journalist Hussein Sharif. Sharif, through his writings in the newspaper Hadarat Al-Sudan, advocated limited cooperation with the British to modernise Sudan but opposed unity with Egypt, fearing it would undermine Sudanese autonomy. This group, closely allied with Sayyid Abdul Rahman al-Mahdi of the Ansar sect, dominated the club's leadership from 1920 to 1933. For this faction, the Mahdi was portrayed as the first Sudanese nationalist and Abd al-Rahman was to many an attractive leader of the independence movement.
The second faction promoted the idea of "Unity of the Nile Valley" which was supported unity with Egypt under the Egyptian crown, emphasising cultural and geographical ties between the two nations. Led by Ahmed al-Feel, they rejected alliances with religious sects, despite many members being from families traditionally loyal to the Khatmiyyah sect, and its leader Sayyid Ali al-Mirghani.
The Graduates' General Congress (GGC) was established on 12 February 1938, with 1,180 graduates approving its constitution and electing a 15-member executive committee. Aimed at advocating for Sudanese welfare and independence, the GGC used rallies, media, and alliances to mobilize public support. In 1942, it submitted demands for self-determination and the repeal of restrictive policies, but these were rejected by the colonial government, which denied the Congress political legitimacy. This rejection caused internal divisions between moderates, who sought cooperation, and assertive figures like Ismail al-Azhari, who pushed for politicisation. Al-Azhari's leadership shifted the GGC's focus to broader nationalist goals.
Al-Azhari's influence culminated in the formation of the Ashiqqa (Brothers) party in 1943, advocating for Sudan's autonomy within a united structure with Egypt, which later became the "National Unionist Party (NUP)" in 1952. Al-Azhari's main support came from the Khatmiyya Sufi order. Despite Khatmiyya still receiving an annual British endowment, the British, concerned about Khatmiyyah's growing political influence, have sought to counteract this by bolstering the political position of Abd al-Rahman al-Mahdi.
In August 1944 Sayyid Abdul Rahman al-Mahdi met with senior GGC members and tribal leaders to discuss formation of a pro-independence political party that was not associated with Mahdism. In February 1945 the National Umma Party had been organized and the party's first secretary, Abdullah Khalil, applied for a government license. The constitution of the party made no mention of Sayyid Abdul Rahman al-Mahdi or of the Ansar. The only visible link to Abd al-Rahman was the party's reliance on him for funding.
This division among nationalist factions, compounded by historical and ideological tensions, hindered a unified front. Efforts in 1946 to negotiate a common stance on Sudan's future further exposed these rifts, solidifying separate paths for unity with Egypt and full independence. This fragmentation shaped the trajectory of Sudanese political developments for years to come.
The pro-Egyptian NUP boycotted the 1948 Legislative Assembly elections. As a result, pro-independence groups dominated the Legislative Assembly. On 19 October 1952, an agreement was reached between Britain and the Umma-dominated legislature and their allies in a collation known as the Sudanese Independence Front that was supported by the British since 1947 to act as bulwark against Egyptian nationalism. This agreement gave the green light for Sudan to achieve self-government by the end of 1952, followed by the exercise of the right to self-determination within the subsequent three years. The legislators then enacted a constitution that provided for a prime minister and council of ministers responsible to a bicameral parliament. The agreement came to be known as the "Gentlemen's Agreement". Later, Colonel Muhammad Naguib, who seized power after the 1952 Egyptian revolution, accepted the right of Sudanese self-determination.
Ismail al-Azhari's pro-Egyptian NUP won the 1953 parliamentary elections and he became the Chief Minister in 1954, he recognized growing public opposition to union with Egypt. In response, al-Azhari shifted the party's stance to support Sudanese independence, advocating for the withdrawal of foreign troops and calling on Egyptian and the British to sponsor a referendum.

### After independence (1956–1969)

On 19 December 1955, shortly after the First Sudanese Civil War had broken out, al-Azhari, declared the Independence of Sudan. Internal divisions between the al-Azhari faction and the Khatmiyya order, primary around al-Azhari's secular policies, led to a split in June 1956, with the Khatmiyya order founding the new People's Democratic Party (PDP), under Ali al-Mirghani's leadership. The Umma and the PDP combined in parliament to bring down the Azhari government.
Al-Azhari's NUP lost its majority in the 1958 parliamentary election, and with support from the two parties and backing from the Ansar and the Khatmiyyah, Abdallah Khalil put together a coalition government. However, from its inception in 1956, the Umma-PDP coalition could not reach an agreement on a permanent constitution, stabilising the south, encouraging economic development, and improving relations with Egypt. Khalil grew disillusioned with the democratic process due to factionalism and bribery in parliament, coupled with the government's inability to resolve Sudan's many social, political, and economic problems. On 17 November 1958 - the day parliament was to convene - then simultaneously Prime Minister and Minister of Defence Abdallah Khalil (a retired army officer) orchestrated effectively a self-coup against the collation civilian government, and handing power to General Ibrahim Abboud.
Sayyid Abd al-Rahman died in 1959, and his son, Sadiq al-Mahdi, was imam of the Ansar for the next two years. After his death in 1961, he was succeeded as imam by his brother, Imam al-Hadi al-Mahdi, while Al-Siddiq al-Mahdi's son, Sadiq al-Mahdi was elected president of the Umma Party in November 1964. On the other hand, Sayyid Ali al-Mirghani died in 1968, leaving his eldest son, Mohamed Osman al-Mirghani to lead the Khatmiyya and PDP. This was dubbed the "divine leadership" by historians.
Following October 1964 Revolution, a parliamentary election was held in 1965, which was boycotted by the PDP and won by the Umma party, but there was a low turnout. The Umma and al-Azhari's NUP formed a collation government headed by Muhammad Ahmad Mahjub (Umma), whereas al-Azhari became Chairman of the Sovereignty Council. However, this coalition collapsed in October 1965 after the two parties failed to agree on control of the Ministry of Foreign Affairs. In July 1966, Prime Minister Mahgoub resigned after a parliamentary vote of censure and was replaced by Sadiq al-Mahdi. Mahgoub resignation was support by Imam al-Hadi al-Mahdi, which lead to the split of the Umma party to Umma–Sadiq and Umma–Imam. Sadiq's collation government failed in May 1967 and Mahgoub returned in leading a coalition government.
Al-Azhari and PDP leader Mohamed Osman al-Mirghani reunited in December 1967 in the presence of King Faisal of Saudi Arabia, under the Democratic Unionist Party (DUP). However, divisions within the Umma Party and opposition from Sadiq al-Mahdi's faction led to a political crisis. After Mahjub dissolved parliament, rival governments emerged, one inside the parliament and the other outside. The Supreme Court upheld Mahjub's dissolution, and new parliamentary elections were set for April 1968.
The DUP party won the 1968 election and subsequently formed a coalition government with the Umma–Imama faction. In 1968, Sadiq al-Mahdi's Umma faction formed the parliamentary opposition but faced government crackdowns for resisting constitutional efforts. Later that year, the two Umma factions united to support Imam al-Hadi al-Mahdi for the presidency, while the DUP backed Al-Azhari as their candidate. However, the government was toppled in the 25 May 1969 coup d'état.

### Nimeiry era (1969–1989)

The coup against the was lead by Colonel Gaafar Nimeiry and Imam al-Hadi al-Mahdi withdrew to his base in Aba Island. In March 1970 Nimeiry tried to visit the island to talk with the imam, but was prevented by hostile crowds. Fighting later broke out between government forces opposed by up to 30,000 Ansar. Army units backed up by air support assaulted the island, and about 3,000 people were killed.
Sadiq al-Mahdi was arrested in 1970, and for many years alternated between spells in prison in Sudan and periods of exile. Following the coup attempt in June 1976 that was orchestrated by Sadiq al-Mahdi, Gaafar Nimeiry sought "national reconciliation" and integrated Sadiq al-Mahdi into the Sudanese Socialist Union's political bureau, which ruled under one party system.
Between 1977 and 1985, Nimeiry's implemented an "Islamic approach" in Sudan, which aimed to end sectarian divisions, especially the al-Mirghani and al-Mahdi rivalry, and consolidate Islamic governance. Nimeiry declared himself the "imam of the Sudanese umma", and the Hassan al-Turabi (leader of the National Islamic Front) assisted with drafting the laws that came to be known as the September Laws. Sadiq al-Mahdi opposed the laws.
During the same period, Khatmiyya remained largely inactive, with their leaders in-self exile in Egypt, while allowing its members to freely decide on the degree of participation in central and state governments.
Following the 1985 coup d'état, Sadiq al-Mahdi was again elected president of the Umma party and Khatmiyya and Ansar returned to the political life in Sudan. The Umma and DUP returned to the political landscape in the 1986 election, where the Umma won 100 seats and DUP 63 seats, but al-Turabi's National Islamic Front made substantial gains with 51 seats. Sadiq al-Mahdi became the Prime Minister of Sudan and formed a collation government with the DUP with Ahmed al-Mirghani (Mohamed Osman al-Mirghani's youngest brother) becoming the president.
Sadiq al-Mahdi, who initially opposed the Islamic laws he later supported, envisioned a fully Arabised and Islamised southern Sudan. The collation government was overthrown in the 1989 coup d'état which was led by Colonel Omar al-Bashir and orchestrated by al-Turabi.

### Al-Bashir era (1989–1999) and decline

Omar al-Bashir and al-Turabi regime solidified its power using authoritarian tools, establishing a political security apparatus called "Internal Security," led by Colonel Bakri Hassan Saleh. This body was known for its notorious detention facilities, "ghost houses," where intellectuals were detained and tortured. Public freedoms were eroded, and political parties were abolished.
Al-Bashir adopted more radical instance to Islamism by introducing a stricter penal code than the September laws and establishing the "People's Police," akin to Saudi Arabia's Committee for the Promotion of Virtue and the Prevention of Vice. In this period, Osama bin Laden moved to Khartoum and welcomed by al-Turabi. Training camps for armed Islamic groups were established in Sudan, and al-Turabi attempted mediation between Hamas and the Palestine Liberation Organization.
Meanwhile, the Khatmiyya and the DUP were banned after the coup, with al-Mirghani was placed under house arrest in November 1989 and was released by February 1990. After that, the Khatmiyya remained largely remained largely inactive, with their leaders in-self exile in Egypt until the 2018 Sudanese revolution and 2019 coup d'état. During that period the DUP participated in the 2010 and 2015 general election but received considerably low votes. Following Sudanese transition to democracy from 2019, the DUP party leader Mohamed Osman al-Mirghani returned to lead the party from Sudan in 2022, but shortly returned to Egypt.
Conversely, after further imprisonment and exile, Sadiq al-Mahdi returned to Sudan in 2000 and in 2002 was elected Imam of the Ansar. In 2003 Sadiq was re-elected President of Umma, a position he kept until his death in 2020. The Umma parties split to different competing factions that participated in the 2010 and 2015 general election, receiving limited support.

## Elections performance

| Parliamentary election | Khatmiyya | Seats | Seats | Ansar | Comment |
| 1948 | National Unionist Party | - | 26 | Umma Party | Umma-led parliament |
| 1953 | National Unionist Party | 51 | 22 | Umma Party | NUP government |
| 1958 | People's Democratic Party | 27 | 63 | Umma Party | PDP-Umma collation government |
| 1965 | People's Democratic Party | 3 | 90 | Umma Party | PDP-Umma collation government |
| 1968 | Democratic Unionist Party | 101 | 36 | Umma Party–Sadiq | DUP-Umma collation government |
| 1968 | Democratic Unionist Party | 101 | 30 | Umma Party–Imam | DUP-Umma collation government |
| 1986 | Democratic Unionist Party | 63 | 100 | Umma Party | DUP-Umma collation government |
| 2010 | Democratic Unionist Party | 4 | 8 | Umma Party and its factions | National Congress Party (NCP) government |
| 2015 | Democratic Unionist Party | 2 | 4 | Umma Party and its factions | National Congress Party (NCP) government |
* ↑ NUP boycott the elections