In Part 39 of the Muqaddimah , written in 1377, Ibn Khaldun discusses Arabic dialectology and language contact, reaching substantially correct conclusions marred only by the lack of attention to the role of purely internal developments in language change. The section is worth reading, if you haven't already come across it; it gives some idea of just how divergent the different Arabic "dialects" already were in his time. Like a lot of his work, if he had written it today, it would get many Arab nationalists up in arms! The translation is my own, and needs double-checking - appropriately, the Arabic of Ibn Khaldun is often difficult for modern Arabic readers.

"That the language of the city dwellers and townsmen is a language independent of the language of Mudar [Classical Arabic]

Know that the customary medium of discourse in the towns and among the city-dwellers is not the old language of Mudar, nor the language of the people of the generation (of Arabs). Rather, it is a different language, independent, and far from the language of Mudar and of this generation of Arabs in our time. Indeed, it is further from the language of Mudar (than the language of modern Arabs is).

The fact that it is an independent language is obvious; witness how many changes it has which grammarians consider as solecisms. Nevertheless, it varies in its expressions depending on the town. The language of the Mashriq is somewhat different from that of the Maghreb, and likewise that of Andalus from both. Yet each succeeds, with his own language, in realising his purpose and expressing what is within him. That is what is meant by "tongue" and "language". The loss of case-/mood-suffixes is not a problem for them, as we have already said regarding the Arabs of the present day.

As for the fact that it is further than the language of this generation (of Arabs) from the original language, that is because distance from the language depends on mixing with non-Arabness. The more one mixes with non-Arabs, the further one gets from the original tongue, because habits are acquired by learning, as we have said, and this (linguistic) habit is a mixture of the original habits which the Arabs had and the secondary habits which the non-Arabs had. So the more they hear it from non-Arabs and grow up with it, the further they get from the original habit.

You may observe this in the towns of Ifriqiya and the Maghreb and Andalus and the Mashriq:

As for Ifriqiya and the Maghreb, the Arabs there mixed with the non-Arab Berbers as they spread their civilisation among them. Hardly a town or a generation was isolated from them. Thus non-Arabness came to predominate over the Arab tongue which they had had. It became a different, mixed language, within which non-Arabness predominated for the reasons outlined. So it is further from the original tongue.

Likewise the Mashriq. When the Arabs prevailed over its nations, the Persians and the Turks, they mixed with them. Their languages then spread among them through the labourers and farmers and captives whom they took as servants and nannies and wet-nurses. As a result, their own language was corrupted by corruption of their (linguistic) habits, until it became a different language.

Likewise the people of Andalus, with the non-Arab Galicians and Franks.

All the people of the towns from these regions came to have a different language, specific to them and distinct from that of Mudar [=Classical Arabic], and distinct each from the other - as we shall recall. It is as if it were a different language due to their generations' mastery of the linguistic habit of it. And God creates and decrees what He will."