With domestic affairs settled, Otto II would focus his attention from 980 onward to annexing the whole of Italy into the Empire. His conquests brought him into conflict with the Byzantine Empire and with the Muslims of the Fatimid Caliphate, who both held territories in southern Italy. After initial successes in unifying the southern Lombard principalities under his authority and in conquering Byzantine-controlled territory, Otto II's campaigns in southern Italy ended in 982 following a disastrous defeat by the Muslims. While he was preparing to counterattack Muslim forces, a major uprising by the Slavs broke out in 983, forcing the Empire to abandon its major territorial holdings east of the Elbe river.