Al-Abbasiyya (Arabic: العباسية|al-Abbāsiyya|the [[Abbasid]] place), also known as Qasr al-Aghaliba (Arabic: قصور الأغالبة, 'the Aghlabid palaces') and al-Qasr al-Qadim (Arabic: القصر القديم, 'the old palace'), was the first palace city and capital of the Aghlabid Emirs, which ruled Ifriqiya from 800 to 909.The city was built as a residence by the first Aghlabid emir, Ibrahim ibn al-Aghlab, in the first year of his governorship, and was named after his suzerain, the Abbasid caliph. Its construction followed a long period of unrest by the populace of the old capital of Ifriqiya, Kairouan, during the 8th century. To reduce the threat of revolt, the new Aghlabid regime dismantled the walls of Kairouan, but also decided to move the residence of the government to a new location three miles southeast of Kairouan, which became al-Abbasiyya. Al-Abbasiyya was a fully functional city, with baths, inns, markets, and a brick-built Friday mosque. Its large cistern even supplied Kairouan with water. In the center of the city, near the palace of al-Rusafa (named after palaces in Damascus and Baghdad), was a large square, where troop reviews took place. The city was walled and had several gates, manned by a special corps of freed slaves. From the outset, a mint for silver and gold coinage, as well as government factories producing robes of honour and standards, were also established in the city.
Al-Abbasiyya remained the residence of the Aghlabid emirs until 876/7, when a new palace city, al-Raqqada, some miles to the south, was established by Ibrahim II . The city then declined in importance, although it was still inhabited until the invasion of Ifriqiya by the Banu Hilal in the mid-11th century.