The Sanhaja Berber tribal confederation had played a key role in the formation of the Almoravid dynasty, and as a result had experienced a period of strength and power throughout the Dynasty's existence. Following its defeat and disintegration the Sanhaja were left divided and weak. The more aggressive and warlike of the Sanhaja clans dominated the smaller and weaker groups, demanding tribute. Some of the weaker groups, having failed to preserve their independence, turned away from violence and instead devoted themselves to Islamic learning and piety. These groups became known as the Zawaya, or Maraboutic tribes. A relationship then grew up between stronger warrior clans, who cared little for Islam, and the pious Zawaya. Arab nomads known as the Hassan later arrived in the south-western Saharan region in the 15th century and proceeded to dominate. A Moorish society then developed, consisting of the Hassan, the Zawaya, and the Lahma; client groups subservient to both the Hassan and the Zawaya.