The war was led by Sidi Ibrahim Al Aroussi, son of the famous Cheikh Sidi Ahmed Al Aroussi (died in 1593, near to Smara, in Western Sahara). Al Aroussi, with his two sons Shanan Al Aroussi and Sidi Tounsi Al Aroussi, led a powerful force of the Hassani tribe, the Aroussi Army, to conquer the Berber Imarat in current Mauritania and gain access to Bilad as-Sudan ("the Land of the Blacks", in Senegal and Mali).

The Sanhaja Berber tribal confederation had played a key role in the formation of the Almoravid dynasty, and as a result had experienced a period of strength and power throughout the Dynasty's existence. Following its defeat and disintegration the Sanhaja were left divided and weak. The more aggressive and warlike of the Sanhaja clans dominated the smaller and weaker groups, demanding tribute. Some of the weaker groups, having failed to preserve their independence, turned away from violence and instead devoted themselves to Islamic learning and piety. These groups became known as the Zawaya, or Maraboutic tribes. A relationship then grew up between stronger warrior clans, who cared little for Islam, and the pious Zawaya. Arab nomads known as the Hassan later arrived in the south-western Saharan region in the 15th century and proceeded to dominate. A Moorish society then developed, consisting of the Hassan, the Zawaya, and the lahma; client groups subservient to both the Hassan and the Zawaya.[4]

Successive Hassani rulers exerted pressure on the Zawaya, demanding tribute. The tribute was ostensibly payment for protection, however the Hassan were often either incapable or unwilling to protect their clients, resulting in Zawaya commerce and agriculture being frequently disrupted by raids and general insecurity. The Hassan were thus seen as legitimate targets for jihad, given that they were seen as failing to oblige their obligations under Islam, even though they remained nominally Muslim.[4]

Tensions between the Hassan and the Zawaya had also been exacerbated by an economic crisis; the two groups had previously complimented each other, with the Hassan being largely nomadic, whilst the Zawaya were agriculturalists along the Senegal. The French had established a trading post on the Atlantic at Saint-Louis in 1659, and this was in turn pulling the trade along the Senegal towards the Atlantic, disrupting the traditional trade along the Senegal. In particular the monopoly of Saint-Louis was depriving Moors of the slave labour they had relied on for centuries as well as the cereals from the agriculturalists along the Senegal.[5] The nomadic desert groups north of the Senegal were heavily reliant on these cereals for survival. Berber society was then caught between the southern movement of the Hassan Arabs and the loss of trade due to Saint-Louis.[5]

A class of Muslim scholars called the Torodbe[a] seem to have originated in Futa Toro, later spreading throughout the Fulbe territories. Two of the Torodbe clans in Futa Toro claimed to be descended from a seventh century relative of one of the companions of the prophet Muhammad who was among a group of invaders of Futa Toro. The Torodbe may well have already been a distinct group when the Denianke conquered Futa Toro.[7]

In the last quarter of the seventeenth century the Mauritanian Zawaya reformer Nasir al-Din launched a jihad to restore purity of religious observance in the Futa Toro.
He gained support from the Torodbe clerical clan against the warriors, but by 1677 the movement had been defeated.[8]
After this defeat, some of the Torodbe migrated south to Bundu and some continued on to the Futa Jallon.[9]
The farmers of Futa Toro continued to suffer from attacks by nomads from Mauritania.[10]
By the eighteenth century there was growing resentment among the largely Muslim lower class at lack of protection against these attacks.[6]

A Zawaya scholar, born as Ashfaga but also known as Awbek, began to gain prominence amongst the Zawaya, eventually being known by just his title; Nasr ad-Din. Nasr had begun his preaching by calling for repentance, but as his movement grew amongst his tribe; the Banu Dayman, and amongst wider Zawaya society, Nasr began calling for the formation of an Islamic state. The state that Nasr advocated would be above tribal and ethnic tensions and would resemble the ideal society of the early Caliphs. Nasr went by numerous self-appointed titles, such as Sayyiduna (our master), Imamund (our Imam), and Mushi al-Din (he who spreads the faith), before finally settling on Nasir al-Din (protector of the faith). Nasr demanded the loyalty of all of the Zawaya, forcing every Zawaya leader to swear allegiance to him. His government was composed of himself, a Vizier, and 4 Qadi's, and tasked itself with enforcing order in the southern Sudan; known as Qibla. Nasr set himself the goals of fighting those who neglected Islam and oppressed Muslims, uniting the various groups of the region in a single state, and creating a new and divinely guided order.[11]

In 1673 Nasir al-Din began his jihad by invading Futa Tooro and the various Wolof states beyond the Senegal river. By focusing on the states south of the Senegal Nasr avoided an early confrontation with the powerful Hassan. Nasr's focus on these states also gained him control of the entrepôts for the gum trade along the Senegal. French trade on the Senegal had seen large growth since the beginning of the century, and thus control of the entrepôts strengthened Nasr financially, whilst offsetting the Hassan control of the trade to the ports on the Saharan coast.[11]

Nasr then turned his attention to strengthening the rule of his Islamic state, and imposed the zakat on the tributary tribes north of the Senegal river. One of these tributary tribes; Bubba, called on Hadi, the Emir of Trarza, to help him resist Nasr ad-Din. Tradition maintains that the war between Nasr ad-Din and Trarza broke out as a result of the Bubba's call for help from Trarza, resulting in the war being called Shurbubba, or "the war of Bubba."[11]

The Hassan were united in their opposition to Nasr.[11] Most of the burden of fighting fell to the Emirate of Trarza, although the Emirate of Brakna sent Trarza reinforcements and helped immobilise Zawaya in their own regions to prevent them from joining the forces of Nasr. Most Zawaya of the Southern Sahara sided with Nasr, although some remained neutral, and others supported the Hassan, with a Zawaya scholar from Shinqit issuing a fatwa against Nasr, stating that he was not a Caliph and had no right to impose the zakat. This fatwa led to Hãdi, the Trarza chief, sending troops to seize animals that had already been sent as zakat.[12]

The ensuing conflict saw the forces of Nasr and those of Hãdi clash in three battles; the first near the port of Portendick and the second near the salt mines of Awlil positioned just north of the mouth of the Senegal river. The Zawaya were victorious in all three of the battles, but Nasr was killed in the final battle in August 1674 along with many of his closest followers.[12]

Following Nasr's death the Zawaya elected al-Faqih al-Amin. al-Amin had been born Sidi al-Fadil, and was descended from Zawaya employed by the Hassan chiefs. It was therefore hoped that al-Amin would be able to bring the Hassan to terms, who having been beaten in three battles, were ready to negotiate. An agreement was reached between the Hassan and the Zawaya whereby the Hassan would recognise the spiritual authority of the Zawaya Imam, and in return the Imam would give up all political claims, including his ability to levy zakat. However the majority of the Zawaya, who still followed the militarism of Nasr ad-Din, were opposed to any compromising with the Hassan, and deposed al-Amin. The Zawaya elected Qadi Uthman as his replacement. Uthman had previously served as Nasr al-Din's Vizier and had been one of his closest companions.[12]

Uthman revived the policy of militarism and non-negotiation with the Hassan. He also reintroduced the zakat, which he demanded from weaker tribes and factions. These weaker groups resisted, joining together and seeking the support of Hadi. Hadi's forces then proceeded to wipe out the Zawaya's tax collecting expedition. Uthman was in turn killed fighting the Wolof, and was succeeded by a string of 3 Imams including Munir ad-Din, Nasir ad-Din's brother. The Imamate was absolutely and unconditionally defeated by the combined forces of the Hassan and the rebelling tribes.[12]

As a result of their absolute defeat the Zawaya relinquished all claims to political or military authority and paid tribute to the Hassan for their protection.[12] Hassani warriors were given the right to drink the milk from Zawaya herds and access to a third of the water from Zawaya wells. Zawaya also had to accommodate passing Hassani for three days. The Zawaya were also broken up as a group amongst the Hassani, with each Hassani group having its own Zawaya. In general however the conditions endured by the Zawaya differed little from those experienced before the war. Although defeated, the war had the result of adding militancy to the Zawaya religious teaching, which in turn spread to neighbouring countries in the Sudan. This philosophy would set in motion and invigorate internal conflicts, helping to spur on the Fula jihads.[13]

The war ended in defeat for the Berber tribes, and they were from that point on forced to surrender their arms and submit to the warrior Arab tribes, to whom they paid the horma tributary tax. They would remain in roles as either exploited semi-sedentary agriculturalists and fishermen (znaga tribes), or, higher up on the social ladder, as religious (marabout or zawiya) tribes. This division between Hassane Arab warriors and Berber marabouts, plus the subordinate znaga, existed in Mauritania up until the Frenchcolonization, when France imposed itself militarily on all tribes, and so broke the power of the Hassane. Still, the traditional roles of the tribes remain important socially in these areas.[14]

Even more important was that the Arab victory brought about widespread cultural and linguistic arabization, with Berber tribes surrendering their Tamazight and other Berber tongues to the Arabic language, in the form of the Hassaniya dialect of the Beni Hassan. It is still spoken as the main language in Moorish Mauritania and Western Sahara, as well as in parts of Morocco and Algeria.

^The name "Torodbe" comes from the verb tooraade, meaning to beg for alms in reference to the Qur'anic school pupils who supported themselves in that way. The label of begging was likely applied by the Denanke court who made fun of the Muslim underclass.[6]