 In 840 AD, the Samanid chief of Samarkand Nūḥ ibn Asad, wrested control of the city from the Turks.In that year, Nūḥ built a wall around it to protect it from the Turks.By this time the city was a flourishing market center at the nexus of nomad and sedentary lands.