High in the rugged hills some 460 kilometres (280 miles) south of the capital Rabat, Ait Kine is home to one of country's few remaining collective granaries called agadir in Amazigh, Morocco's Berber language.
According to Abdelghani Charai, merchant of village of Ait Kine; "The granary was a guarantee of security, especially in the event of an "insiba" (rebellion of local tribes against the central government). The inhabitants stored barley and other food. In the event of an attack, they would also take refuge there because they had everything here, water, food... And above all safety."
The imposing, fully functional structure, likely built in the 18th century and restored in 2012, is still used by local residents to store and protect their produce.
"The granary of Aït Kine is still in use, and it is well preserved. The villagers use it, they are very attached to their heritage. The other granaries in other regions have been lost." added Abdelghani.
The agadir has stocks of barley, dates and almonds, but it is also used to safeguard documents like marriage and birth certificates, religious texts and contracts, and recipes for traditional medicine inscribed on palm stems.
"They (the inhabitants of the village) used wood to make all kinds of documents like birth certificates, marriage certificates, etc. They are here in these manuscripts." said Lahcen Boutirane, guardian of the collective granary in the village of Ait Kine while sorting the stems.
Collective granaries can be found elsewhere in North Africa -- in Algeria's Aures mountains, Tunisia's south and Libya's Nafusa mountains -- but they are most common in Morocco, though many are no longer in use.
The kingdom has more than 550 ancient igoudar -- the plural of agadir -- according to the culture ministry, which is preparing a UNESCO World Heritage nomination.
They are located primarily across central and southern Morocco, in caves or on cliff sides, on hilltops and in valleys.
Moroccans hold pro-Palestinian rally to protest Knesset speaker's visit
Egyptian champions Al Ahly win first leg of CAF Champions League final
Mystery of the desert: The lost cities of the Nigerien Sahara
Go to video
Morocco: Berber to be taught in all schools
Gitex Africa: Tech giants, startups and SMEs gather in Morocco
Morocco: Activists rally outside court as minor's gang rape appeal trial is postponed