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.