Arabs in the Caucasus
Arabs first established themselves in the Caucasus in the eighth century, during the Arab conquest of Persia (see also Muslim conquest of Armenia and Arab rule in Georgia). The process of shrinking of the Abbasid Caliphate in the tenth century was followed by the establishment of several Arab-ruled principalities in the region, chiefly the principality of Shirvan (most of present-day Azerbaijan and southeast part of Dagestan) ruled by the Mazyadid dynasty. As the rulers of Shirvan (known as Shirvanshahs) spread their control over much of the Southeast Caucasus and at the same time found themselves more and more isolated from the Arab world, they were undergoing gradual Persianisation. Arab personal names of the Shirvanshahs gave way to Persian ones, members of the ruling dynasty were claiming Ancient Persian descent (possibly having intermarried with members of local pre-Islamic nobility) and Persian gradually became the language of the court and the urban population, while the rural population continued to speak the indigenous languages of Caucasian Albania. However by the seventeenth century a local Turkic idiom (which later would develop into modern Azeri) became the language of everyday life, as well as the language of interethnic communication. Arab migration continued during the Middle Ages. Nomadic tribes of Arabs occasionally made their way into the region undergoing assimilation by the local population. In 1728, a Russian-Swedish officer named Johann-Gustav Gärber described a group of Sunni Arab nomads who rented winter pastures near the Caspian shores of Mughan (in present-day Azerbaijan). It is likely that the Arab nomads arrived in the Caucasus in the sixteenth or seventeenth century. In 1888, an unknown number of Arabs still lived in the Baku Governorate of the Russian Empire. Language
In his report, Gärber mentioned that the Arab nomads of Mughan spoke a "mixed Turkic-Arabic language". In 1840 Abbasgulu Bakikhanov attested an "altered version of Arabic" among some residents of Shirvan (see Shirvani Arabic). The Arabic language, or its local variety, lingered in Azerbaijan until the second half of the nineteenth century and in Dagestan until the 1930s (in Darvag, Tabasaransky District), after which the population of these pockets began identifying itself as Azeri, having adopted Azeri as their mother tongue. The 1897 Russian Imperial census indicated 912 Arabic-speakers in central and southern Dagestan and none in what would become Azerbaijan. Notably, literary Arabic retained its role as the language of learning in Dagestan for centuries and was the main language of instruction in the local schools from 1920 to 1923 until replaced by Azeri (and later by other indigenous languages of Dagestan). the names of dozens of villages across Azerbaijan and Dagestan (e.g. Arabgadim, Arabojaghy, Arablar, Arab-Yengija, Chol Arab etc.) bear traces of their once Arab population. See also
Arab diaspora
Ibn al-Khattab

References

Caucasus
Caucasus
Ethnic groups in Azerbaijan
Ethnic groups in Dagestan
Peoples of the Caucasus
Muslim communities of the Caucasus