From the Middle Ages to around 1750, Afghanistan was part of Iran. Two of the four main capitals of Khorasan (Balkh and Herat) are now located in Afghanistan. The countries of Kandahar, Ghazni and Kabul formed the frontier region between Khorasan and the Indus. This land, inhabited by the Afghan tribes (i.e. ancestors of Pashtuns), was called Afghanistan, which loosely covered a wide area between the Hindu Kush and the Indus River, principally around the Sulaiman Mountains. The earliest record of the name Afghan (Abgân) being mentioned is by Shapur I of the Sassanid Empire during the 3rd century CE which is later recorded in the form of Avagānā by the Vedic astronomer Varāha Mihira in his 6th century CE Brihat-samhita. It was used to refer to a common legendary ancestor known as Afghana, grandson of King Saul of Israel. Hiven Tsiang, a Chinese pilgrim, visiting the Afghanistan area several times between 630 and 644 CE also speaks about them. Ancestors of many of today's Turkic-speaking Afghans settled in the Hindu Kush area and began to assimilate much of the culture and language of the Pashtun tribes already present there. Among these were the Khalaj people which are known today as Ghilzai.