Waqfs are charitable endowments in Islamic law, created to allocate property or income for religious, educational, or social purposes. These institutions played a vital role in the development of social and economic structures in Muslim societies, particularly in providing services and support to communities, which contributed to the political dynamics and social hierarchies in regions like the Maghreb and the spread of Islam throughout North and West Africa.