and the Samanid dynasty in 900. Mahmud of Ghazni conquered Khorasan in 994 and in the year 1037 Toghrül, the first of the Seljuq empire rulers conquered Nishapur. Mahmud of Ghazni retaliated against the invaders several times, and finally the Ghaznavids defeated Sultan Sanjar. But there was more to come, as in 1157 Khorasan was conquered by the Khwarazmids and because of simultaneous attacks by the Mongols, Khorasan was annexed to the territories of the Mongol Ilkhanate. In the 14th century, a flag of independence was hoisted by the Sarbedaran movement in Sabzevar, and in 1468, Khorasan came into the hands of Tamerlane and the city of Herat was declared as the capital. In 1507, Khorasan was occupied by Uzbek tribes. After the death of Nader Shah in 1747, parts of it were occupied by the Afghans for a short period. In these periods, Birjand was a small part of Quhistan which almost encompasses the borders of today South Khorasan. The main cities of Quhistan were Toon (now Ferdows) and Qaen. Birjand grew in recent centuries, especially during the Qajar dynasty and found its important role in this region. This region was a place of refuge for some movements like the Ismaili, and was the target of Arab refugees who escaped from the tyranny of the Abbasid caliphate. Zoroastrian vestiges also exist in the area. In 1824, Herat became independent for several years when the Afghan Empire was split between the Durranis and Barakzais. The Persians sieged the city in 1837, but the British assisted the Afghans in repelling them. In 1856, the Persians launched another invasion, and briefly managed to recapture the city; it led directly to the Anglo-Persian War. In 1857 hostilities between the Persians and the British ended after the Treaty of Paris was signed, and the Persian troops withdrew from Herat. Afghanistan reconquered Herat in 1863 under Dost Muhammad Khan, two weeks before his death. Khorasan was the largest province of Iran until it was divided into three provinces on September 29, 2004. The provinces approved by the parliament of Iran (on May 18, 2004) and the Council of Guardians (on May 29, 2004) were Razavi Khorasan, North Khorasan, and South Khorasan. Administrative divisions Cities According to the 2016 census, 448,147 people (over 58% of the population of South Khorasan province) live in the following cities: Arianshahr 3,729, Asadiyeh 5,460, Ayask 5,143, Birjand 203,636, Boshruyeh 16,426,