China–Arab relations (, ), have extended historically back to the Rashidun Caliphate, with important trade routes, and good diplomatic relations. Since the establishment of the People's Republic of China (PRC), modern China–Arab relations have gotten significantly closer, with the China–Arab States Cooperation Forum (CASCF) helping the People's Republic of China and the Arab nations to establish a new partnership in an era of the growing globalization. As a result, close economic, political and military relations between the two sides have been maintained. From 2018, the relations became significantly warmer, with the PRC and the Arab countries exchanging state visits, establishing cooperation mechanism and providing support to each other.

Since 1990, no Arab country has official diplomatic relations with the Republic of China (ROC), although it is diplomatically represented in some nations via Taipei Economic and Cultural Offices.

History Medieval era During the Tang dynasty, when relations with Arabs were first established, the Chinese called the Arabs 大食/大石 (Dàshí < Old Chi. *da[y]zyik). The Caliphate was called "Da Shi Guo" 大食國.(Original from Harvard University) The word is thought to be a transcription of Persian Tāzik or Tāzī, derived from a nisba of the Arab tribe Ṭayyiʾ. The modern term for Arab is 阿拉伯 (Ālābó or Alabo).

The Arab Islamic Caliph Uthman Ibn Affan (r. 644–656) sent an embassy to the Tang court at Chang'an.

During the Muslim conquest of Transoxiana, The Arab Umayyad commander, Qutayba ibn Muslim conquered the Bukharan territories of Numushkat and Ramithna in 707 CE (88 AH). But shortly after, he faced a coalition force of roughly 200,000 soldiers from Ferghana and Sogdiana, led by Kur Maghayun, who was the Chinese emperor's nephew. a heavy battle occurred. Qutayba managed to defeat the coalition army in combat, driving its commander to retreat, and then led his army back to his base at Merv.

Qutayba ibn Muslim is reported to have advanced as far as Kashgar, where he captured the city and fought the Chinese forces, took spoils and captives, and pushed deep into Chinese territory. the Tang emperor sent letter requesting to negotiate with Qutayba. Qutayba sent a Muslim delegation to negotiate with the emperor, resulting in an agreement between the Arabs and the Chinese under which the Muslims would withdraw from the city in exchange for tribute and valuable gifts from the Tang court. however, this report is dismissed by some modern historians. Historian Mahmoud Mohammed Khalaf replied to the dismissal claims and presented it as a rebuttal to the view of the historians who dismissed the claim of the battle, specifically to the Orientalist Gibb:

The Arab Umayyad Caliphate in 715 AD deposed Ikhshid, the king the Fergana Valley, and installed a new king Alutar on the throne. The deposed king fled to Kucha (seat of Anxi Protectorate), and sought Chinese intervention. The Chinese sent 10,000 troops under Zhang Xiaosong to Fergana. He defeated Alutar and the Arab occupation force at Namangan and reinstalled Ikhshid on the throne.*Bai, Shouyi et al. (2003). A History of Chinese Muslim (Vol.2). Beijing: Zhonghua Book Company. ., pp. 235-236

Chinese General Tang Jiahui led the Chinese to defeat the following Arab-Tibetan attack in the Battle of Aksu (717). The attack on Aksu was joined by Turgesh Khan Suluk. Both Uch Turfan and Aksu were attacked by the Turgesh, Arab, and Tibetan force on 15 August 717. Qarluqs serving under Chinese command, under Arsila Xian, a Western Turkic Qaghan serving under the Chinese Assistant Grand Protector General Tang Jiahui defeated the attack. Al-Yashkuri, the Arab commander and his army fled to Tashkent after they were defeated.

During the decline of the Umayyad Caliphate in 750, combined with Emperor Xuanzong's expansion policy, enabled Tang to reassert its influence in Transoxania and become the predominant power in Chinese Turkestan. However, this resurgence ended suddenly at the Battle of Talas in 751. The Tang army led by Gao Xianzhi was defeated by the Abbasid army under Ziyad ibn Salih near present-day Tashkent. Sources differ on the force numbers and casualties with army sizes ranging from 10,000 to 100,000 for the Chinese side and 30,000 to 200,000 for the Abbasid side, although the larger numbers for both are likely exaggerated. Chinese sources state that the Tang army suffered 20,000 to 30,000 casualties while Arab sources state that 50,000 Tang soldiers were killed and 20,000 were taken captive. This defeat marked the end of Tang westward expansion in Transoxiana.The Abbasids then consolidated their rule in Transoxania.

A Chinese captured at Talas, Du Huan, was brought to Baghdad and toured throughout the caliphate. He observed that in Merv, Khurasan, Arabs and Persians lived in mixed concentrations. He gave an account of the Arab people in the Tongdian in 801 which he wrote when he returned to China.

Arabia [Dashi] was originally part of Persia. The men have high noses, are dark, and bearded. The women are very fair [white] and when they go out they veil the face. Five times daily they worship God [Tianshen]. They wear silver girdles, with silver knives suspended. They do not drink wine, nor use music. Their place of worship will accommodate several hundreds of people. Every seventh day the king (Caliph) sits on high, and speaks to those below saying, ' Those who are killed by the enemy will be born in heaven above; those who slay the enemy will receive happiness.' Therefore they are usually valiant fighters. Their land is sandy and stony, not fit for cultivation; so they hunt and eat flesh.(Original from Harvard University)(Original from the University of California)

This (Kufa) is the place of their capital. Its men and women are attractive in appearance and large in stature. Their clothing is handsome, and their carriage and demeanor leisurely and lovely. When women go outdoors, they always cover their faces, regardless of whether they are noble or base. They pray to heaven five times a day. They eat meat [ even] when practicing abstention, [for] they believe the taking of life to be meritorious.

The followers of the confession of the “Dashi” (the Arabs) have a means to denote the degrees of family relations, but it is degenerated and they don’t bother about it. They don’t eat the meat of pigs, dogs, donkeys and horses, they don’t respect neither the king of the country, neither their parents, they don’t believe in supernatural powers, they perform sacrifice to heaven and to no one else. According their customs every seventh day is a holiday, on which no trade and no cash transactions are done, whereas when they drink alcohol, they are behaving in a ridiculous and undisciplined way during the whole day.

An Arab envoy presented horses and a girdle to the Chinese in 713, but he refused to pay homage to the Emperor, said, he said "In my country we only bow to God never to a Prince". The first thing the court was going to do was to murder the envoy, however, a minister intervened, saying "a difference in the court etiquette of foreign countries ought not to be considered a crime." A second Arab envoy performed the required rituals and paid homage to the Emperor in 726 A.D. He was gifted with a "purple robe and a girdle".(Original from Harvard University)

There was a controversy between the Arab ambassadors and Uyghur Khaganate Ambassadors over who should go first into the Chinese court, they were then guided by the Master of Ceremonies into two different entrances. Three Da shi ambassadors arrived at the Tang court in 798 A.D. A war which was raging between the Arabs and Tibetans from 785 to 804 benefited the Chinese.(Original from Harvard University)

Products were traded by sea routes between China and Arabs.

According to Professor Samy S. Swayd Fatimid missionaries made their Dawah in China during the reign of al-'Aziz bi-Allah.

Military and political relations One legend among Muslims in China said that China during the Tang dynasty exchanged 3,000 Chinese soldiers sending them to the Arabs and the Arabs in turn sent 3,000 Arab Muslim soldiers to China.

When Caliph Al-Saffah died in 754, Chinese sources record that his successor, the Abbasid caliph Al-Mansur, sent his diplomatic delegations regularly to China. Al-Mansur's delegations were known in China as Khayi Tashi (Black Clothes).

Caliph Abu Ja'far al-Mansur established friendly relations with the Chinese. Historical sources mention a series of successive Arab embassies after the Battle of Talas. in 756, Abu Ja'far al-Mansur provided the Chinese Emperor Xuanzong of Tang with a contingent of 3,000 to 4,000 soldiers to suppress the An Lushan Rebellion that erupted against him. After suppressing this rebellion, the Emperor allowed them to settle in China's most important cities as a reward for the assistance they provided to the Emperor. Over time, these Arabs married Chinese women, and a new generation emerged, from whom came the Muslims of China.

As a result of these good relations between both sides - the Abbasids and the Chinese - Arab merchants settled in China. They had a judge (qadi) who issued rulings according to Islamic law, led prayers, and performed Islamic rituals. The Chinese Empire granted Arabs special facilities for selling their goods, and the Emperor himself would order the purchase of some of these goods for his personal account. Thus, Arabs were able to penetrate deep into the country and practice trade with complete freedom. For a long time, Arabs found complete welcome there, to the extent that the shops of major Chinese merchants would supply Arab traders with all the products and fine manufactures they needed from their lands to be shipped in Arab caravans upon their return to the lands of Islam.

The Abbasids continued to send embassies to China and 13 diplomatic gifts are recorded between 752 and 798.