The origins of the Turkish-speaking minorities in Iran date back to the invasions and migrations that occurred between the X and XIV centuries AD, in the area contained within Iran's current political boundaries. However, the area of earlier Iranian empires, especially Transoxiana, witnessed Turkish penetration already in the late Sassanian period. The Afghan frontiers of India were penetrated by Turkish Khalaj already before the Ghaznavids and mutated into the Pushtun tribes of the Ghilzai. The Azeris are by far the most important ethno-linguistic minority in Iran, with a population of over 6 million living in the two provinces of Azerbaijan and Zanjan. The settlement of this part of Iran by Turkish tribes in the Seljuk and Mongol period led to an ethnic fusion with the original Persian-speaking Azeri population, which to this day speaks an Iranised Turkish dialect. The Azeris' conversion to Shiism during the XIV and XV centuries under the charismatic Sufi Shaykhs of Ardabil assured their integral role in the Iranian polity established in the XVI century by the Safavid ruler Shah Ismail.