[6]: 4 An inscription carved on a marble plaque over the doorway of the ribat's cylindrical tower records the name of the Aghlabid emir Ziyadat Allah I and the year 821.
[3] Other scholars, such as Alexandre Lézine and Jonathan Bloom, interpret this date as the year when the tower was added to the existing ribat.
[8][3] Georges Marçais cited the year 821 as the date of the tower's construction and the completion of the ribat in its current form.
[1] Mourad Rammah states that the ribat was almost certainly founded in the 8th century but was completely reconstructed by Ziyadat Allah I in 821.
[5] During the restoration, two floors, a basement, and battlements were added, as well as thirty rooms for guards to live complete with bathroom and toilet.
[9][better source needed][10][dead link] After the Byzantine city of Melite (modern Mdina on Malta) was captured by the Aghlabids in 870, marble and columns plundered from its churches was used to build the Ribat.
[3] Its plan resembles the original form of the Ribat of Monastir founded in 796 by Harthama ibn A'yan.
[3] Inside the gate are narrow openings for a former portcullis and for defenders to drop projectiles or boiling oil on attackers.
[3]The gate leads to the rectangular courtyard which is flanked by arcades on four sides, behind which are lines of small rooms and an upper floor.
Another small room in the fortress, located above the gate at the top of the walls, contains another mihrab and is covered by a dome supported on squinches.