The Arab wars
By the 13th century, the Sanhadja faced another threat, this time from the Maqil Arabs. The Arabs seized many of the caravan routes and a few hundred years of skirmishes led to the more serious Thirty Years War with the Arabs lasting from 1644-74.
When they were eventually defeated and the Treaty of Tin Yedfad signed, they agreed to a process of education and vocational training which was based on Arabization of the culture. Consequently, Sanhadja descendants now speak Hassaniya, an Arabic dialect, which takes its name from the Bani Hassan tribe, the principal Maqil tribe that defeated them.