The choice of some Berber tribes to inhabit the Djebel has been seen by many historians as a strategic defensive choice, historically linked to the invasion of the Arab tribes of Banu Hilal in Ifriqiya around the middle of the 11th century. The inscription preserved under the entrance arch of Gasr Zenata has therefore been used as evidence of the birth of collective granaries coinciding with this migration. However, the picture is more complex and today this interpretative reading has been questioned. First of all, the first construction of the Gasr Zenata, to which the inscription refers, was probably not for the purpose of collective storage but more likely of a defensive military nature. Even considering the mountain as a place of retreat fleeing the Arab invaders has its limits. It would be more appropriate to consider the choice of the mountain as an economic choice, linked to the greater rainfall and the possibility of exploiting that landscape for tree cultivations which are more difficult to achieve in the coastal plain and impossible in the Dahar. Once settled in the mountainous landscape, the control of cultivable areas, caravan routes, water resources and the protection of agricultural products from theft but above all from drought and famine, determined the location of the settlements and of the collective granaries, the gsour.
We can distinguish two main typologies of gsour:
1. isolated buildings mostly composed of a ring of granary cells arranged on several levels of variable shape (ellipsoidal or quadrangular)
2. real neighbourhoods built on the top of a mountain on where the troglodyte dwellings are cut.
The last ones take advantage of areas not usable for the troglodyte houses and at the same time locate the storerooms in the safest part of the settlement, protected from marauders and enemies.
The gsour built on hills or on the plain, following the model of a collective granary in an area shared by the community, became a peculiar architectural typology of the territory.
The floor plan and the internal organization is varying. They were used by tribes dispersed in smaller settlements of which the gasr was the reference point often leading to the emergence of new villages around whose name is nothing but that of the gasr.
The function of the gasr is essentially agricultural, a place of storage of cereals, olives, oil, dates and livestock products in a territory characterized by irregular rainfall and periods of drought and a storage space is a necessity.
Furthermore, food reserves are a primary good in a society where little money circulates and barter is preferred in exchanges. Its custody is managed by each family with special attention.
Moreover, the gasr is, better than an abode, the docking point of a semi-nomadic community alternating between transhumance for livestock and periods of sowing and harvesting, the safe place to leave everything that is not needed when travelling, where a few individuals guarantee the safety of the goods of hundreds of families.
When insecurity and tension among tribes and social groups are permanent, maximum vigilance is required to protect the food supplies and the gasr is the perfect solution for all these issues and also a possible shelter if necessary. The gasr is the pivotal element of the social structure of the entire region.
Finally, there is evidence that many gsour periodically hosted craft activities complementary to the agricultural occupations of the ghouraf owners, such as blacksmithing and carpentering, to arrive at a real market function as occurs in the gsour of Medenine, Ghomrassen and Zarzis.