The term Djema'a (or Djemaa, meaning "Congregation" or "Gathering" in Arabic) can refer to two things in a Western Sahara context.
The Djema'a was the leading body in a Sahrawi tribe, composed of elders and elected leaders. It organized war efforts, raiding parties, lawmaking and diplomacy, among other things, and also settled disputes between members of the tribe. Sometimes, a larger assembly known as the Ait Arbein (Council of Forty) would be gathered, composed of elders from several tribes, to organize the community against foreign invasion or other such supratribal concerns.
The exact organization of the Djema'a varied from tribe to tribe, but it generally incorporated both old Berber customs, Arab traditions and based its practices on Islamic law. Women served on the Djema'a in at least some of the Sahrawi tribes.
An enduring social structure, tribalism had ruled the Sahrawis since they first appeared in the area in the Middle Ages, but a combination of colonization and modernization has gradually eroded its hold on the population.
After Spain and France invaded the territory in 1884, the Djema'as remained very active, but as the Spanish Army gradually extended its control and subdued the tribes, resistant Djema'a leaderships were killed or jailed, while others were coerced or bribed into cooperation with the colonizers. The Ma al-Aynayn uprising in the early 1900s, and the rebellions which followed, represented something of a last stand of the traditional tribal society against colonization. In the 1950s, tribal authority was slowly eroding due to urbanization and new ways of life.
Harsh Spanish repressive measures after the Ifni War, including forced settlement, accelerated this process. By 1967, Sahrawi nationalist politics were for the first time organized in a modern political party, the Harakat Tahrir. Tribal traditions and divisions remain strong in Sahrawi society, however, although the formal system of Djema'a has largely been destroyed by the appearance of modern states.