Sogdians also lived in Imperial China and rose to prominence in the military and government of the Chinese Tang dynasty (618–907 AD). Sogdian merchants and diplomats travelled as far west as the Byzantine Empire. They played an important part as middlemen in the trade route of the Silk Road. While originally following the faiths of Zoroastrianism, Manichaeism, Buddhism and, to a lesser extent, Nestorian Christianity from West Asia, the gradual conversion to Islam among the Sogdians and their descendants began with the Muslim conquest of Transoxiana in the 8th century. The Sogdian conversion to Islam was virtually complete by the end of the Samanid Empire in 999, coinciding with the decline of the Sogdian language, as it was largely supplanted by Persian.