In the eleventh century, the Banu Hilal invaded the North African plains and plateaus, but not the mountains (Rif, Kabylie or Aures) and bring with them Hilalian dialects of Arabic, which over the centuries have been in significant contact with other languages, including languages of Europe.
The official language or one of the official languages in all of the countries in North Africa is Arabic.