 The city was besieged by the Aghlabids for almost a year in 827–828, but Byzantine reinforcements prevented its fall.It remained the center of Byzantine resistance to the gradual Muslim conquest of Sicily until it fell to the Aghlabids after another siege on 20/21 May 878.During the two centuries of Muslim rule, the capital of the Emirate of Sicily was moved from Syracuse to Palermo.