https://qz.com/1982825/when-did-islam-come-to-china/From written records and imperial edicts engraved on steles (standing stone slabs monuments) it is clear that these Islamic communities enjoyed the favor of the emperors—especially during the Tang (618-907 AD), Yuan (1271-1368), Ming (1368-1644) and Qing (1644-1912) dynasties. Islam was looked on favorably by the imperial court because of its ethics, which—as far as the emperors were concerned—promoted harmonious and peaceful relations between the diverse peoples in the imperial territories.
...
Islam was considered by Christian missionaries in the country—and particularly by Russian scholars—as a growing threat. Islam was considered by many in the west to have the potential to become the national religion in China—which would have made China the biggest Islamic country in the world.
...
Many of the mosques had affiliated schools teaching the Arabic language and Islamic writings to the children of the Muslim communities. Suzhou is one of the first cultural centers where Islamic scriptures were published in the Chinese language. Translations from Persian into Chinese were made by the 16th-century Suzhou scholars, Zhang Zhong and Zhou Shiqi, making the city an early hub of Islamic intellectual culture.
(When will China reconnect to this past and understand that Russia is its true enemy?)