By 1000, the Abbasid Caliphate existed in name only, without temporal power beyond its court in Baghdad. The surrounding region was under the rule of the Buwayhids, a dynasty from Daylam on the shores of the Caspian, who had conquered Fars in 934, and the rest of Iraq rapidly thereafter. In the west, the Shiite Fatimids had moved from their original base in Ifriqiya to occupy Egypt, founding their capital at Cairo (969). To the east, Mahmud of Ghazni declared himself sultan (997–1030), rapidly establishing a Sunni dominion from Tabaristan to Multan, and driving the Qarkhanids from Bukhara (1025). However, upon his death, dynastic disputes would lead to a rapid disintegration. The Byzantines stood to benefit from the disunity amongst their traditional Islamic adversaries: Basil II (976–1025) used the respite to secure his western frontier, but then a succession of weak emperors would leave them once more exposed.
— OR —