Arabic had been spoken in the region since the Muslim conquest of the South Caucasus at the beginning of the eighth century. It was brought there by Arab settlers consisting mostly of military staff, merchants and craftsmen from Iraq and Syria, and was used as an official language. It experienced decline after the weakening of the Caliphate in the thirteenth century and was gradually replaced by Persian/Tat and Azeri. Groups of Arabs (mostly from Yemen) continued to immigrate to southern Dagestan influencing the culture and literary traditions of the local population who had already become Islamized.
The latest documentation of the existence of Shirvani Arabic is attributed to the Azeri historian Abbasgulu Bakikhanov who mentioned in his 1840 historical work Golestan-i Iram that "to this day a group of Shirvan Arabs speaks an altered version of Arabic." Arabic continued to be spoken in Dagestan until the 1920s mostly by upper-class feudals as a second or third language, as well as a language of literature, politics and written communication.
North Caucasian resentment of the Russians for robbing them of their national history is doubled for the Daghestanis by the forced loss of their Arabic patrimony. In the nineteenth century, it was considered that the best literary Arabic was spoken in the mountains of Daghestan. Daghestani Arabist scholars were famous, attracting students from the whole Muslim world. The lingua franca in Daghestan before the Revolution was Arabic. Then, in the 1920s and 1930s, the main thrust of the anti-religious campaign, was to eradicate Arabic, a religious language, and replace it with Russian. The finest flower of Arabist scholarship disappeared in Stalin's purges.