 Around 985, Seljuq converted to Islam.In the 11th century the Seljuqs migrated from their ancestral homelands into mainland Persia, in the province of Khurasan, where they encountered the Ghaznavid empire.In 1025, 40,000 families of Oghuz Turks migrated to the area of Caucasian Albania.