Laribus was built up under the reign of
Justinian, forming part of the second line of fortifications defending Roman Africa against invasion from the southwest. It was behind the forts at
Tebessa and
Haydra in this system, and it was also protected by the fort at
Thucca Terenbenthina. Laribus itself controlled access to the
Medjerda valley from the west. It held major strategic importance, and was accordingly one of the strongest fortresses in Roman Africa. Laribus remained under Byzantine control until the early 8th century. When the city of Carthage was captured by Arab forces in the late 690s, Byzantine and Berber troops withdrew to Laribus; they remained there until
Musa ibn Nusayr's campaign in the region. Under the
Umayyad Caliphate, a
jund was stationed at Laribus. It saw action during the
Berber Revolt in the 740s. Under the
Abbasid Caliphate, a Syrian jund was garrisoned at Laribus. After the death of the provincial governor
al-Fadl ibn Rawh ibn Hatim al-Muhallabi, there was a regional civil war between powerful Arab families, and one side concentrated its forces at Laribus before marching on the provincial capital of Qayrawan. Throughout this period, Laribus's city walls appear to have remained intact.
Aghlabid rule Under the
Aghlabids, Laribus held major strategic importance as a gateway between Qayrawan and the
Tell region.
Ibn al-Athir later called Laribus the "gateway to Ifriqiya".
Mohamed Talbi described Laribus as the single most important stronghold in northwestern Ifriqiya under Aghlabid rule. In 824, the city's jund joined the revolt of
Mansur al-Tunbudhi, the ruler of
Tunbudha. When a power struggle broke out between Mansur and
Amir ibn Nafi, Laribus and its jund initially gave Mansur refuge, but after being besieged with catapults, they handed him over and joined Amir's side. Laribus then served as Amir's headquarters until he died in 828. The city then stayed under Aghlabid control and its jund did not take part in the rebellion of
Salim ibn Jalbun in 847. In 893, the jund of Laribus joined an unsuccessful revolt against
Ibrahim II. At the end of the 9th century,
Ya'qubi described Laribus's population as a mix of Berbers and Arabs. At the end of October 907, after
Abu Abdallah al-Shi'i had conquered the western part of Aghlabid territory,
Ziyadat Allah III hastily mustered a defense force at Laribus, leaving it under the command of the prince
Ibrahim ibn Abi al-Aghlab. They expected Abu Abdallah to take this route en route to Qayrawan, and Ibrahim remained at Laribus during the entire winter of 907-8. Abu Abdallah avoided a direct confrontation with the Aghlabid army and instead took a long detour to the south, by way of
Kasserine. In early 908, Ibrahim marched south to stop Abu Abdallah's advance, and the two armies fought an inconclusive battle at
Dar Madyan. Ibrahim returned to Laribus, while Abu Abdallah headed eastward before turning back. The next year, Abu Abdallah's forces resumed the offensive, capturing Shaqbanariya and directly besieging Laribus. The deciding battle took place at Laribus on 18 March, 909. The fighting lasted until the asr prayer (late afternoon), when a unit of 575 Kutama warriors, having circled around the battlefield in a deep streambed, attacked the Aghlabid army in the flank. The Aghlabid army then fled. Its commander, Ibrahim ibn Abi al-Aghlab, headed back towards Kairouan with what remained of his army. The next day, 19 March, Laribus offered an unconditional surrender to the Kutama, who then massacred its inhabitants and looted the city. (The inhabitants had taken shelter in the city's mosque). The fall of Laribus marked the end of the Aghlabid dynasty. News of the defeat reached
Raqqada the same day, and Ziyadat Allah fled by torchlight that evening.
Later history Although its fortifications were heavily damaged by the siege of 909, Laribus remained an important garrison center under the Fatimids, although the Arab jund was replaced with a Kutama garrison. In 944, the city was captured by Abu Yazid's forces, who sacked and burned the city. Around this time, it seems that Laribus was made into an administrative unit headed by a wali, along with neighboring Ubba. (Before this, it was probably under the governor of Baja.) In 382 AH (992-3 CE), the Zirid ruler al-Mansur dismissed the governor of Laribus and appointed his freedman Qaysar in charge of the city. Laribus remained under Zirid control until 445 AH (1053-4 CE), when the
Banu Hilal captured it and Ubba. Laribus was briefly taken over by the Hammadid
al-Nasir in 1065 and 1068. After the first capture, the Banu Hilal retook the city and by 1067-8 had appointed a governor named Ibn Makraz over Laribus (probably a
Riyahdid); al-Nasir besieged and captured Laribus and executed Ibn Makraz. Afterwards, a local shaykh was in charge; he appealed to the ruler of Shaqbanariya to help drive out the Banu Hilal. Laribus was no longer on commercial routes or held strategic importance, and it quickly declined. == Fortifications ==