With the opening of the Silk Road, traders from the Middle East traveled with caravan to China. Along with commodities they brought to China, they also introduced their
religion to China. Buddhism was the first which arrived in China, then followed by Nestorianism and Islam. Hui (Chinese Muslims) Legends say that the Companions of the Prophet overcame many hardships to bring the Arabic revelation to China. Sa'd ibn Waqqas was believed to travel to China’s capital of Chang’an and Guangzhou. After he passed away in Guangzhou a tomb was built in his honor and it is now named the Tomb of Muslim Sage. Thabit ibn Qays was also believed by Chinese Muslims that he traveled to China and died on the way back home and his tomb is now in Hami of Xinjiang Uygur Autonomous Region. After meeting Sa’d ibn Waqqas and Thabit ibn Qays in Chang’an (present-day Xi’an), Tang Dynasty emperor Gaozong officially agreed the practiced of Islam in China in 651. Mosques began to be constructed in cities where Arabian traders lived, such as Chang’an, Guangzhou, Quanzhou and Yangzhou. Stone tablets unearthed in Xian’s Great Mosque suggest that the Great Mosque was constructed as early as the Tang Dynasty in 742 though most people doubt that Xian Great Mosque was built in the Ming Dynasty 600 years ago.
General speaking, Guangzhou’s Huaisheng Mosque (also named Guangta Mosque) which was built in the Tang Dynasty (618-907) is believed to be the earliest mosque
built in China. The meaning of Huaisheng in Chinese can be understood as "devoted to the Prophet", or else "devoted to the sage (Sa’d ibn Waqqas)" who is supposedly buried there. However, the name may have originally been a direct translation of the Arabic word for "Companions of the Prophet" (huai "to cherish" for the Arabic "sahabah"). The stele unearthed in the Huaisheng Mosque attributes the style of the Light Tower of Huaisheng Mosque to central Asia. It is likely that the tower was originally built in memory of a shaykh from central Asia who came to Guangzhou in the Yuan dynasty. The second oldest mosque is believed to be the Ashab Mosque in Quanzhou. The name of "Ashab Mosque", which can be translated as Mosque of the Companions (of the Prophet), is found in a large Arabic inscription on the inside of the main entrance of Quanzhou Ashab Mosque. The full inscription translates as follows: This was the first mosque of the people of this land. This auspicious mosque is named the Mosque of The Ancient and The Old, is called the Mosque of the Congregation and the Street, and is titled the Mosque of the Companions. It was built in the year 400 AH (Song dynasty; 1009CE). Three centuries later, Ahmad bin Muhammad Quds, the renowned Hajji, the "Foundation", of Shiraz, built this soaring dome, widened the entrance, redecorated the doors and renovated the windows, completing the works in the Hijra year 710 AH (Yuan dynasty; 1310CE). May the Almighty God be pleased by this act, and grant him mercy, and have mercy upon (the Prophet) Muhammad and his family.
In the Yuan Dynasty, Arabic traders built Hangzhou’s Phoenix Mosque and Yangzhou’s Xianhe Mosque. Eventually, Huaisheng Mosque of Guangzhou; Ashab Mosque
of Quanzhou; Phoenix Mosque of Hangzhou and Xianhe Mosque of Yangzhou are recognized by Chinese Muslims as the four most famous mosques in Southeast China.
Currently there are over 30,000 mosques all over China: 23,000 mosques in Xinjiang Uygur Autonomous Region; 2800 mosques in Northwest China’s Gansu Province; 2580 mosques in Ningxia Hui (Muslim) Autonomous Region; 929 Mosques in Qinghai Province; 620 Mosques in central China’s Henan Province; 600 Mosques in Southwest China’s Yunnan province; 506 mosques in East China’s Shandong province. Even on the roof of the World, Tibet, there are three mosques for about 2000 Tibetan Muslims to perform their daily prayers.