The Umayyad invasion of Gaul from 719 to 759 was a period of intense conflict between the Carolingians and the Umayyads, marked by the Battle of Tours in 732. Umayyad forces were finally expelled from Gaul with the recovery of Narbonne in 759 by Pepin the Short, but the Umayyad presence in Spain continued to represent a strong threat to the Carolingians.
Contacts between the Carolingians and the Abbasids started soon after the establishment of the Abbasid Caliphate and the concommital fall of the Umayyad Caliphate in 751. The Carolingian ruler Pepin the Short had a powerful enough position in Europe to "make his alliance valuable to the Abbasid caliph of Baghdad, al-Mansur". Former supporters of the Umayyad Caliphate were established firmly in southern Spain under Abd ar-Rahman I, and constituted a strategic threat both to the Carolingian on their southern border, and to the Abbasid at the western end of their dominion.
Embassies were exchanged both ways, with the apparent objective of cooperating against the Umayyads of Spain: a Frankish embassy went to Baghdad in 765 which returned to Europe after three years with numerous presents, and an Abbasid embassy from Al-Mansur visited France in 768.
Commercial exchanges occurred between the Carolingian and Abassid realms, and Arabic coins are known to have spread in Carolingian Europe in that period. Arab gold is reported to have circulated in Europe during the 9th century, apparently in payment of the export of slaves, timber, iron and weapons from Europe to Eastern lands. As a famous example, the 8th century English king Offa of Mercia is known to have minted copies of Abbasid dinars struck in 774 by Caliph Al-Mansur with "Offa Rex" centered on the reverse amid inscriptions in Pseudo-Kufic script.
In 777, pro-Abbasid rulers of northern Spain contacted the Carolingian to request help against the powerful Umayyad Emirate of Cordoba in southern Spain, led by Abd ar-Rahman I. The "Spanish Abbasids sought support for their cause in Pepin's Francia; he was content to oblige because the Cordoban dynasty posed a constant military threat to southwestern France".
Sulayman al-Arabi the pro-Abbasid Wali (governor) of Barcelona and Girona sent a delegation to Charlemagne in Paderborn, offering his submission, together with the allegiance of Husayn of Zaragoza and Abu Taur of Huesca in return for military aid. The three pro-Abbasid rulers also conveyed that the caliph of Baghdad, Muhammad al-Mahdi, was preparing an invasion force against the Umayyad ruler Abd al-Rhaman I.
Following the sealing of this alliance at Paderborn, Charlemagne marched across the Pyrenees in 778 "at the head of all the forces he could muster". His troops were welcomed in Barcelona and Girona by Sulayman al-Arabi. As he moved towards Zaragoza, the troops of Charlemagne were joined by troops led by Sulayman. Husayn of Zaragoza, however, refused to surrender the city, claiming that he had never promised Charlemagne his allegiance. Meanwhile, the force sent by the Baghdad caliphate seems to have been stopped near Barcelona. After a month of siege at Zaragoza, Charlemagne decided to return to his kingdom. On his retreat, Charlemagne suffered an attack from the Basques in central Navarra. As a reprisal he attacked Pamplona, destroying it. However, on his retreat north his baggage train was ambushed by the Basques at the Battle of Roncevaux Pass on August 15, 778.
After these campaigns, there were again numerous embassies between Charlemagne and the Abbasid caliph Harun al-Rashid from 797, apparently in view of a Carolingian-Abbasid alliance against Byzantium, or with a view to gaining an alliance against the Umayyads of Spain.
Indeed, "Charles's conflict with the Umayyad Emir of Cordova made him an ally of the Abbasid emir of Baghdad, the celebrated Harun al-Rashid", and they were "forming a pact against a common enemy - namely the Muslim rulers in Umayyad Spain".
For Charlemagne, the alliance may also have functioned as a counterweight against the Byzantine Empire, which was opposed to his role in Italy and his claim to the title of Roman Emperor. For Harun al-Rashid, there was an advantage in having a partner against his rivals in Umayyad Spain.
Three embassies were sent by Charlemagne to Harun al-Rashid's court and the latter sent at least two embassies to the Charlemagne. Harun al-Rashid is reported to have sent numerous presents to Charlemagne, such as aromatics, fabrics, a clock, a chessboard, and an elephant named Abu 'Abbas. The automatic clock was a water-clock made of brass, described in the 807 Royal Frankish Annals. It marked the 12 hours with balls of brass falling on a plate every hour, and also had twelve horsemen who appeared in turn at each hour.
The 797 embassy, the first one from Charlemagne, was composed of three men, the Jew Isaac (Isaac Judaeus, probably as interpreter), Lantfrid and Sigimud, and Harun al-Rashid was described as "Aaron, king of the Persians". Four years later in 801, an Abassid embassy arrived in Pisa, composed of "a Persian from the East" and one envoy "Emir Abraham, probably Harun al-Rashid's governor in North Africa, Ibrahim ibn al-Aghlab, with news about Jew Isaac that he was returning with numerous presents. They met with Charlemagne who was present in Italy at that time.
In 799, Charlemagne sent another mission to the Patriarch of Jerusalem.
In 802, a second embassy was sent by Charlemagne, which returned in 806.
In 807, Rodbertus, Charlemagne's ambassador died as he returned from Persia. Harun al-Rashid is also reported to have offered the custody of the Holy places in Jerusalem to Charlemagne. In 807, Abdallah, "sent by the king of the Persian", reached Charlemagne in Aachen accompanied by two monks from Jerusalem, George (a German named Egilbaldus, prior of the Monastery of the Mount of Olives) and Felix, envoys of the Patriarch Thomas. They also brought many gifts, including a clock ("Horologium").
The third and final embassy was sent by Charlemagne in 809, but it arrived after Harun al-Rashid had died. The embassy returned in 813 with messages of friendship, but little concrete results.
Various Islamic influences seem to appear in Christian religious architecture such as the multi-colored tile designs which may have been inspired by Islamic polychromy in the 800 CE gatehouse at Lorsch Abbey.
Early Carolingian architecture generally combines Roman, Early Christian, Byzantine, Islamic and Northern European designs.
In the Byzantine Empire from 723 to 842, Islam and Judaism influenced a Christian movement towards the destruction of images this time, an event known as "Iconoclasm". According to Arnold Toynbee, it is the prestige of Islamic military successes in the 7-8th centuries that motivated Byzantine Christians into evaluating and adopting the Islamic precept of the destruction of idolatric images. Charlemagne himself attempted to follow the iconoclastic precepts of the East Roman Emperor Leo Syrus, but this was stopped by Pope Hadrian I.
It seems that in 831, Harun al-Rashid's son al Ma'mun also sent an embassy to Louis the Pious. These embassies also seem to have had the objective of promoting commerce between the two realms.
After 814 and the accession of Louis the Pious to the throne, internal dissensions prevented the Carolingians from further ventures into Spain.
Almost a century later Bertha, daughter of Lothar II and mother of several tenth-century Italian kings, is reported to have sent an embassy to the Abbasid caliph Al-Muktafi, requesting friendship and a marital alliance.