DAKAR (Reuters) - In an upmarket suburb of Senegal's seaside capital, a branch of Iran's Al-Mustafa University teaches Senegalese students Shi'ite Muslim theology, among other subjects. The branch director is Iranian and a portrait of Iranian Supreme Leader Ayatollah Ali Khamenei hangs on his office wall.
The teaching includes Iranian culture and history, Islamic science and Iran's mother tongue, Farsi; students receive free food and financial help. The university is a Shi'ite outpost in a country where Sufism, a more relaxed, mystical and apolitical form of Sunni Islam, is the norm.
Two miles away, the Islamic Preaching Association for Youth (APIJ) teaches the strand of Islam that predominates in Iran's great religious, political and military rival, Saudi Arabia.
The APIJ funnels cash from donors in Saudi Arabia, Qatar, Dubai and Kuwait to mosques run by Salafists - conservative Sunni Muslims who are sworn enemies of Iran. The APIJ's shelves are stacked with Salafist theology texts adorned with gold-leaf Arabic inscriptions - texts its imams use to preach in some 200 mosques across Senegal.
The two institutions embody a contest for influence in Senegal, and more widely in Africa, between Iran-backed Shi'ites and Saudi-funded Sunnis. It's one strand of a broad power struggle in which each side is spending millions of dollars to win converts. At stake is huge political influence, on a resource-rich continent that has often served as the theater for rivalries between world powers.
Interviews with teachers and converts on both sides shed light on the depth of the divide and the ways both sides try to gain an edge.
The Iranian director of Dakar's branch of Al-Mustafa makes no secret of his concerns over his Saudi rivals. "The Salafists came to Africa to destroy ... Islam," said Chiekh Abbas Motaghedi in February.
Up the road, in the APIJ building, the Salafists show equal passion.
"We cannot accept the Iranian influence in Senegal, and we'll do everything to fight it," said Chiekh Ibrahima Niang, the imam, sitting legs crossed in a silky white robe. "We need to show the world that Shi'ism is wrong."
But for Senegal, either influence would be a disruption. It's a society that has always leaned towards political moderation, thanks largely to a tradition of tolerance espoused by its Sufi orders or "brotherhoods."
"Where the brotherhoods are weak, as in eastern Senegal, is where the threat of radicalisation is highest," said Bakary Sambe, director of the Dakar-based Timbuktu Institute and a coordinator for the Observatory on Religious Radicalism and Conflicts in Africa.
Iran has often been a destabilizing influence: In 2010, an Iranian arms shipment was intercepted in the Nigerian port of Lagos which Senegal suspected were destined for rebels in its southern Casamance region. Dakar briefly cut ties with Tehran over it.
Salafism is the more troubling strand, Sufis say: It is largely free of political interference, but has shared cause with violence that Senegal has so far escaped.
"Salafists in Senegal are cousins of those making jihad in Mali," Ahmed Khalifa Niasse, son of a deceased powerful Sufi Imam and vocal critic of Gulf Arab religious influence, told Reuters at his palace in Dakar.
"They see themselves as soldiers of God purifying Islam."
Salafists vehemently deny that link. "Salafism has nothing to do with terrorism," says Niang. "Yes, there are people who want to use force to impose the Salafist way, but we are very much against them. We are against violence."
Iran's supreme leader Khamenei supervises the activities of Al-Mustafa, which is based in the Iranian city of Qom and has branches in 50 countries. Thousands of students from across Africa receive enough Iranian money to enable them and their families to visit Qom while finishing their studies, said the son of a cleric based there who declined to be named because of the sensitivity of the issue.
Al-Mustafa in Dakar receives 150 students a year and gives them free tuition, a stipend and breakfast, its director of studies Chiekh Adrame Wane told Reuters. Graduates repay the generosity by promoting Iran online or in books, said a professor based in Qom. In countries like Somalia, Iran pays for weddings and home furniture, including a TV and a fridge, if both couples are Shi'ite or newly converted to Shi'ism.
Al-Mustafa is now Iran's main tool for promoting Shi'ism, said the professor, who also declined to be named. Its aim is "to train people to be loyal to the Islamic Republic and the Supreme Leader."
A top official at Al-Mustafa in Qom, also declining to be named, gave a different view. "Our goal is purely cultural and educational. We want to promote higher education in Africa," he said.
"Saudi Arabia, Kuwait, Turkey and many other countries have built their religious schools in Africa. Alongside them, there are many American and British Christian schools, and even Hindu schools. So there is a rivalry in Africa and if we do not establish our presence there, we would fall behind."
Two senior Al-Mustafa officials said students and teachers at Al-Mustafa are routinely vetted by the Ministry of Intelligence or the powerful Islamic Revolutionary Guard Corps. Reuters was unable to independently verify this.
Motaghedi, the Al-Mustafa director in Dakar, said the university had no involvement with the intelligence services or Iranian politics. "We're a private university ... Our only mission is to teach, nothing else," he said, adding that Khameni was merely a patron and adopting Shi'ism was not a requirement for study.
In the 2016 Iranian budget, Al-Mustafa received 2,390 billion rials ($74 million). But the university receives more funding from the office of the Supreme Leader and other conglomerates under his command, one official said. Neither Motaghedi nor Wane would comment on financial flows to the Dakar branch.
At the APIJ in Dakar, Imam Niang extolled the virtues of Sunni Islam. "Salafism ... has a simple message," he said as he scanned an ornate Koran through reading glasses. "To be a good Muslim, you must follow the practices of the Prophet Mohammed."
Niang went to Koranic schools from age 6 until 27 and later studied in Saudi Arabia. Immediately after he returned in 1989, he and fellow conservatives set up the APIJ in Senegal. Since then, hundreds of modest mint-green and sky-blue mosques financed by the APIJ have sprung up in suburbs of Dakar and fishing villages across the country.
A success for the Salafists was when they gradually took over worship at the main mosque at Dakar's Anta Diop University in the 1990s.
Imam Ismaila Ndiaye, coodinator of Senegal's Salafist movements and preacher at the university, said his strand of Sunni Islam offered an alternative to Sufism, asserting that Senegal's secular state and liberal values were imposed on it by French colonizers. But he said Salafist mosques were not turning Senegalese youth towards jihad.
"If the Catholics can finance projects in Senegal aimed at evangelizing at people, then why shouldn't Saudi Arabia do the same thing?" he said.
He said Gulf businessmen had committed only small sums to Sunni movements in Senegal – $20 million in total over several decades – but a steady stream of funds continues to what he identified as three main pillars of Salafism: the APIJ, al Falah, which was founded in 1975, and a movement on outskirts of Dakar led by firebrand cleric Ahmed Lo, who spent 17 years in Saudi Arabia.
Judging who is winning the contest for influence is tricky. Imam Sherif Mballo, secretary general of the League of AhlulBayt, a pan-African Shi'ite movement founded last August, says there are between 30,000 and 50,000 Shi'ites in Senegal, where the population is 15 million.
Mballo converted to Shi'ism after watching the Iranian revolution on TV, then worked with the Iranian embassy for 25 years, making several visits to Iran. But when it came to establishing his own pro-Iran Shi'ite group, after an initial injection from an Iranian businessman - he declined to say how much - he said he received nothing more.
There are no reliable figures on the numbers of Salafists in Senegal, said the Timbuktu Institute's Sambe. However, he said Salafists control several hugely popular mosques.
Peter Pham, Africa director of the Atlantic Council in Washington, said traditional Senegalese Sufi brotherhoods have more in common with the conservative Sunni strand prevalent in Saudi Arabia than they do with Shi'ites, because Sufism is already part of the Sunni religion.
Some Senegalese find the Sufi traditions of their ancestors old hat and stifling. The opportunity to adopt other versions of Islam is liberating.
Maths teacher Souleymane Sall, 38, converted to Salafism while at school. He liked the pure focus on the prophet's acts, and he was weary with what he saw as the lack of intellectual rigour in the Sufi faith he grew up with.
But after university, a friend lent him a book on Shi'ism and, after doing more research, he started to suspect a lot of bad things the Salafists were saying about it were false.
"Eventually, I concluded that Shi'ism was the right path for me," he told Reuters. "At least for the moment."
Cocks reported from Dakar, Sharafedin from Dubai; Edited by Sara Ledwith and Richard Woods
The views expressed in this article are not those of Reuters News.