major cities, even serving as its capital, before it fell to the Franks under Clovis in 507 (Battle of Vouillé). From that time, Toulouse was the capital of Aquitaine within the Frankish realm. Under Frankish rule In 721, Duke Odo of Aquitaine defeated an invading Umayyad Muslim army at the Battle of Toulouse. Many Arab chroniclers consider that Odo's victory was the real stop to Muslim expansion into Christian Europe, incursions of the following years being simple raids without real will of conquest since they did not besiege the cities (including the one that ended with Charles Martel's victory at the Battle of Tours, also called the Battle of Poitiers). The Frankish conquest of Septimania followed in the 750s, and a quasi-independent County of Toulouse emerged within the Carolingian sub-kingdom of Aquitaine by the late 8th century. The Battle of Toulouse of 844, pitting Charles the Bald against Pepin II of Aquitaine, was key in the Carolingian Civil War. County of Toulouse Charlemagne had created the county of Toulouse in 778 to guard the border of Muslim Spain, but the disintegration of the kingdom of Aquitaine and the weakness of royal power in the following centuries led to the de facto independence of the county of Toulouse and many provinces. In the 11th and 12th centuries, southern France was still steeped in Latin culture. Unlike the north of France, justice followed written Roman law and the nobles were highly educated. This was the time of the troubadours who wrote their poetry in Occitan (called "Provençal" at the time), then one of the most sophisticated languages in Europe. Like the other great lords of the Midi, the counts of Toulouse maintained and favoured these poets, this is how Count Raymond V employed for some time the famous Bernard de Ventadour, expert in singing courtly love. In 1096, Raymond IV, Count of Toulouse, left with his army at the call of the Pope Urban II to join the First Crusade, of which he was one of the main leaders. This exodus of its warriors and nobles, reinforced by the creation of the faraway County of Tripoli by Raymond IV at the beginning of the 12th century, weakened the city militarily as well as the ascendancy that its counts had over it. The Duke William IX of Aquitaine challenged the possession of the city on the grounds that it should have been inherited