Islam during the Song dynasty

The transition from the Tang to the Song dynasty (960–1279) in China did not greatly interrupt the trends of Chinese Muslims established during the Tang rule.

Islam continues to increase its influence
Many Muslims began to go to China to trade during the Tang dynasty. During the Song dynasty (960–1279), Muslims began to have a greater economic impact and influence on the country. Muslims in China dominated foreign trade and the import/export industry to the south and west. Indeed, the office of Director General of Shipping for China's great seaport of Quanzhou was consistently held by a Muslim during this period.

Meanwhile, Arabic storytellers were narrating fantastical stories of China, which were incorporated into the One Thousand and One Nights (Arabian Nights) as the "Tale of Qamar al-Zaman and Budur", "The Story of Prince Sayf al-Muluk", and "The Hunchback's Tale" story cycle.

Migration of Muslims to China
During the Song dynasty, an increasing number of foreign Muslims began permanently settling in China and began intermarrying with the locals.

In 1070, the Emperor Shenzong of Song invited 5,300 Arabs from Bukhara, to settle in the Song dynasty. The emperor used these men in his campaign against the Liao dynasty in the north. Later on these Muslims were settled between the Northern Song capital of Kaifeng and Yenching (Yanjing, modern day Beijing). The object was to create a buffer zone between the Song dynasty and the Liao dynasty. In 1080, 10,000 Arab men and women migrated to the Song dynasty on horseback and settled in all of the provinces of the north and north-east.

The Arabs from Bukhara were under the leadership of Prince Amir Sayyid "So-fei-er" (索菲尔). The prince was later given an honorary title. He is reputed of being the "father" of the Muslim community in China. Prior to him Islam was named by the Tang and Song Chinese as the "law of the Arabs" (Dàshí fǎ 大食法; Dàshí derived from the Chinese rendering of Tazi — the name the Persian people used for the Arabs). Su fei-erh renamed it to "the religion of the Huihui" (Huíhuí-jiào 回回教).

Some Chinese officials from the Song era also married women from Dashi (Arabia).

Notable Muslims
In 1031, a prominent merchant and Abbasid ambassador called Abu Ali arrived to Emperor Renzong's court to give tribute and gifts. In turn, Renzong rewarded Abu Ali 50,000 ounces of silver. He soon settled in Guangzhou and married the daughter of a Chinese general. Ali's descendants (with the surname Pu) would hold high positions later in the Song and Yuan dynasties as bureaucrats, statesmen, military officials, Confucian scholars, and influential merchants.

In the Song period, a Chinese Muslim called Liang Jiegu was famed for his medical abilities. His ancestors arrived from Arabia and settled in Kaifeng. The family were given the surname "Liang" by a Song emperor.

Some of the most distinguished merchants of Guangzhou and Quanzhou during the Song Dynasty included the Muslim traders Pu and Shi Nuowei. Pu arrived to China from Champa while Shi was from Sumatra. Muslim merchants like Pu and Shi played an important role within the trading network between China and Southeast Asia.