The historian Ibn Khaldun shared two popular theories of the origin of the Berbers. One was that they were descended from Canaan, son of Ham, son of Noah. Either that or they were descended from another son of Ham, Keloudjm.
As Muslims moved westward across northern Africa, Arabization had a profound effect on Berber culture: tribal practices were replaced with Islam. During the 12th century, Christian and Jewish communities became marginalized, although Jews continued to exist as dhimmis, protected peoples.
Prior to the influence of Islam, however, most Berber groups were either Christian or Jewish or Animist. One of the most famous of early Christian fathers, St. Augustine of Hippo, was from a Berber family. On the other hand, so possibly was Arius, an early heretic. Another Berber who created an approach to Christianity that did not suit the mainstream was the heretic Donatus Magnus. Let's dabble in heresy next time.