The Battle of Bagdoura (or Baqdura) was a decisive confrontation in the Berber Revolt in late 741 CE. It was a follow-up to the Battle of the Nobles the previous year, and resulted in a major Berber victory over the Arabs by the Sebou River (near modern Fes). The battle would permanently break the hold of the Umayyad Caliphate over the far western Maghreb (Modern day Morocco), and the resulting retreat of elite Syrian forces into Spain would have implications for the stability of al-Andalus.
Background
The Berber revolt broke out in early 740 in western Morocco, in response to the oppressive, unfair (and, by Islamic law, illegal) tax collection and slave-tribute policies imposed on Muslim Berbers by Ubayd Allah ibn al-Habhab, governor in Kairouan, Ifriqiya and over all the Maghreb and al-Andalus. The Berber rebellion was inspired by Kharijite activists of the Sufrite sect, who held out the promise of a puritan Islamic order, without ethnic or tribal discrimination, a prospect appealing to the mistreated Berbers.
The revolt was begun under the leadership of the Matghara Berber chieftain (although alleged to be a humble water-carrier) Maysara al-Matghari. In a few months in 740, the Berbers successfully seized Tangiers and the whole of western Morocco, down to the Sous valley. But when the Ifriqiyan governor dispatched an Arab vanguard under Khalid ibn Abi Habiba against Tangiers, the Berbers deposed Maysara and placed the rebel army in the hands of a more experienced military commander, the Zenata chieftain Khalid ibn Hamid al-Zanati. Khalid ibn Hamid destroyed the Ifriqiyan army at the Battle of the Nobles in late 740.
The main Ifriqiyan army under Habib ibn Abi Obeida al-Fihri arrived too late to prevent the slaughter of the original army, and could do little more than hold the line around Tlemcen and appeal to Kairouan and Damascus for reinforcements.
The Syrian Expedition
Upon hearing the news of the disaster that befell the Ifriqiyan nobles, the Umayyad Caliph Hisham is said to have famously exclaimed "By God, I will most certainly rage against them with an Arab rage, and I will send against them an army whose beginning is where they are and whose end is where I am!"
Hisham dismissed the Ifriqiyan governor Obeid Allah, and appointed Kulthum ibn Iyad al-Qasi as his replacement. Kulthum was to be accompanied by a fresh Arab army of 30,000 - 10,000 Umayyad clients and 20,000 tribal forces—raised from the regiments (junds) of the east. Specifically 6,000 men each were to be raised by four main Syrian junds of Jund Dimashq (Damascus), Jund Hims (Homs), Jund al-Urdunn (Jordan), and Jund Filastin (Palestine), 3,000 from Jund Qinnasrin, and an additional 3,000 were to be picked up from Egypt. Caliph Hisham designated Kulthum's nephew Balj ibn Bishr al-Qushayri as his lieutenant and successor should anything befall him. The Jordanian commander Thalaba ibn Salama al-Amili was designated second successor.
The 'Syrian' army (as it was called, despite its Egyptian contingent) set out in early 742 and arrived in Ifriqiya in July–August, 741. The vanguard Syrian cavalry under Balj ibn Bishr, which had moved ahead of the bulk of the forces, was the first to arrive in Kairouan. Their brief stay was not a happy one. The Syrians arrived in haughty spirits, playing up their role as rescuers of the hapless Ifriqiyans. They received a cool reception by the suspicious Ifriqiyan authorities in Kairouan - it is reported the city's gates were closed at Balj's approach, and that local officials were quite uncooperative in meeting the requests of the Syrian vanguard. Interpreting this as ingratitude, the frustrated Syrians imposed themselves on the city, requisitioning supplies and billeting troops, with little regard for local authorities or priorities.
The citizens of Kairouan immediately wrote to the Ifriqiyan military commander Habib ibn Abi Obeida (then with the remnant of the Ifriqiyan army, still in the outskirts of Tlemcen) complaining of the Syrian behavior, and he fired off a heated missive to Kulthum threatening to turn his arms against the Syrians if the abuses in Kairouan did not cease. Kulthum's diplomatic reply cooled things down a bit.
Moving slower with the bulk of the forces, Kulthum ibn Iyad himself did not himself enter Kairouan, but merely dispatched a message assigning the government of the city to Abd al-Rahman ibn Oqba al-Ghaffari, the qadi of Ifriqiya. Then, collecting the Syrian vanguard, Kulthum hurried along to make up with the remaining Ifriqiyan forces of Habib ibn Abi Obeida holding ground in the vicinity of Tlemcen.