Upon the death of
Yahya ibn Umar in the spring of 1056 at the
Battle of Tabfarilla, the spiritual leader Abdallah ibn Yasin appointed Abu Bakr as the new military commander and amir of the Almoravids. That same year, Abu Bakr recaptured
Sijilmassa from the
Maghrawa of the
Zenata confederation. The city had been taken earlier by Yahya, but subsequently lost; Abu Bakr recaptured it definitively for the Almoravids in late 1056. In order to ensure they did not lose Sijilmassa again, Abu Bakr launched a campaign to secure the roads and valleys of southern
Morocco. He immediately captured the
Draa valley, then moved along the Wadi Nul (along the edge of the
Anti-Atlas, picking up the adherence of the
Sanhaja tribes of the
Lamta and the
Gazzula (Jazzula) to the Almoravid movement. Abu Bakr led the conquest of the
Sous valley of southern Morocco, seizing the local capital of
Taroudannt in 1057. By negotiation, Abdallah ibn Yasin secured an alliance with the
Masmuda Berbers of the
High Atlas, which allowed the Almoravids to cross the mountain range with little incident and seize the critical Zenata-ruled citadel of
Aghmat in 1058 with little opposition. Delighted at the apparent ease of their advance, Abdallah ibn Yasin ventured into the lands of the
Berghwata of western Morocco with only a light escort and was promptly killed. Abu Bakr, who was then mopping up the area north of Aghmat, wheeled the Almoravid army around and conquered the Berghwata in a brutal campaign of revenge. The death of the spiritual leader Abdallah ibn Yasin left the Almoravids under the sole command of Abu Bakr. Abu Bakr continued carrying out the Almoravid program without assuming the pretence of religious authority in himself. Abu Bakr, like later Almoravid rulers, took up the comparatively modest title of
amir al-Muslimin ("Prince of the Muslims"), rather than the
caliphal ''
amir al-Mu'minin'' ("Commander of the Faithful"). Abu Bakr married the wealthiest woman in
Aghmat,
Zaynab an-Nafzawiyyah, who helped him navigate the complicated politics of southern Morocco. But Abu Bakr, a rustic desert warrior, found crowded Aghmat and its courtly life stifling. In 1060/61, Abu Bakr and his Sanhaja lieutenants left the city and pitched their tents on the pastures along the
Tensift River, setting up an encampment for their headquarters, as if they were back in the Sahara desert. Stone buildings would eventually replace the tents, and the encampment would become the city of
Marrakesh, an unusual-seeming city for the time, evocative of desert life with planted palms and an oasis-like feel. Abu Bakr placed his cousin
Yusuf ibn Tashfin in charge of Aghmat, and assigned him the responsibility of maintaining the front against the Zenata to the north. In a series of campaigns through the 1060s, while Abu Bakr held court in Marrakesh, Yusuf directed Almoravid armies against northern Morocco, reducing Zenata strongholds one by one. In 1070, the Moroccan capital of
Fez finally fell to the Almoravids. Discontent, however, had arisen in the Almoravid ranks. ==Return to the Desert==