Analysis of information sources in references of the Wikipedia article "Church of Caucasian Albania" in English language version.
...Karabagh had been in ancient and medieval times part of the kingdom of the Caucasian Albanians. This ethoreligious group, now long extinct, had converted to Christianity in the 4th century and drew close to the Armenian church. Over time its upper classes were effectively Armenized. When the Seljuks invaded Transcaucasia in the 11th century, a process of Islamization began that resulted in the conversion of the peoples of the plain to the east of Karabagh to Islam. These people, the direct ancestors of present-day Azerbaijanis, adopted the Turkic language of their conquerors and adopted the Shi'a branch of Islam dominant in neighboring Iran. The mountains remained largely Christian, and in time the Karabagh Albanians merged with the Armenians. The central seat of the Albanian church at Gandzasar became one of the bishoprics of the Armenian church, and the memory of the once-independent national religion was preserved in the stature of the local primate, who was called Catholicos.