Before it was an Islamic city, Samarkand was the chief town of Sogdiana, whose merchants ran the trade between China and Iran and whose language was the working tongue of the eastern Silk Road. Sogdian religion grew from the same root as Zoroastrianism and diverged from it: the dead were exposed and their cleaned bones placed in decorated stone or ceramic ossuaries, of which many have been found around the city, and the goddess Nana, inherited from Mesopotamia, held a prominence she does not have in the Iranian tradition. Wall paintings uncovered at Afrasiab, the old mound, show ambassadors, processions and a rider on a camel, and are among the best evidence for how such a city saw itself in the seventh century.
Because Sogdians moved, so did their religions and other people's. Manichaean communities were established along the route to China, and Manichaean texts in Sogdian have been recovered from the oases to the east. The Church of the East had bishops in Central Asia and its Syriac liturgical books were copied in Sogdian too. Buddhist monasteries operated in the region and Sogdian translators carried texts into Chinese.
The Arab conquest under Qutayba ibn Muslim in 712 ended the Sogdian principalities. Conversion took generations rather than years, and the resulting city was Muslim, Persian speaking and, within two centuries, one of the intellectual centres of the eastern Islamic world.