It originated in the 7th century as a duchy of Francia, ultimately a recreation of the Roman provinces of Aquitania Prima and Secunda. As a duchy, it broke up after the conquest of the independent Aquitanian duchy of Waiofar, going on to become a sub-kingdom within the Carolingian Empire, eventually subsumed in West Francia after the 843 partition of Verdun. It reappeared as a duchy, and in the High Middle Ages, an enlarged Aquitaine pledged loyalty to the Angevin kings of England. Their claims in France triggered the Hundred Years' War, in which the kingdom of France emerged victorious in the 1450s, with many incorporated areas coming to be ruled directly by the French kings.
Gallia Aquitania fell under Visigothic rule in the 5th century. It was conquered by the Franks under Clovis I in 507, as a result of the Battle of Vouillé. During the 6th and early 7th century, it was under direct rule of Frankish kings, divided between the realms of Childebert II and Guntram in the Treaty of Andelot of 587. Under Chlothar II, Aquitaine was again integral part of Francia, but after Chlothar's death in 628, his heir Dagobert I granted a subkingdom in southern Aquitaine to his younger brother Charibert II. This subkingdom, consisting of Gascony and the southern fringe of Aquitaine proper, is conventionally known as "Aquitaine" and forms the historical basis for the later duchy. Charibert campaigned successfully against the Basques, but after his death in 632, they revolted again, in 635 subdued by an army sent by Dagobert (who was at the same time forced to deal with a rebellion in Brittany).
The duchy of Aquitaine as a quasi-independent realm within the Frankish empire established itself during the second half of the 7th century, certainly by 700 under Odo the Great. The first duke is on record under the name of Felix, and as having ruled from about 660. As his successor Lupus, he probably owed allegiance to the Frankish kings. Odo succeeded Lupus in 700 and signed a peace treaty with Charles Martel. He inflicted on the Moors a crushing defeat at the Battle of Toulouse in 721. However, Charles Martel coveted the southern realm, crossed the Loire in 731 and looted much of Aquitaine. Odo engaged the Franks in battle, but lost and came out weakened. Soon after this battle, in 732, the Moors raided Vasconia and Aquitaine as far north as Poitiers and defeated Odo twice near Bordeaux. Odo saw no option but to invoke the aid of Charles Martel and pledge allegiance to the Frankish prince.
Odo was succeeded by his son Hunald, who reverted to former independence, so defying the Frankish Mayor of the Palace Charles Martel's authority. The Carolingian leader attacked Hunald twice in 735 and 736, but was unable to totally subdue the duke and an army put together by counts of key Aquitanian towns, e.g. Bourges, Limoges, etc. Eventually, Hunald retired to a monastery, leaving both the kingdom and the continuing conflict to Waifer, or Guaifer. For some years Waifer strenuously carried on an unequal struggle with the Franks, but his assassination in 768 marked the demise of Aquitaine's relative independence.
As a successor state to the Roman province of Gallia Aquitania and the Visigothic Kingdom (418–721), Aquitania (Aquitaine) and Languedoc (Toulouse) inherited the Visigothic Law and Roman Law which had combined to allow women more rights than their contemporaries in other parts of Europe. Particularly with the Liber Judiciorum, which was codified in 642 and 643 and expanded in the Code of Recceswinth in 653, women could inherit land and title and manage it independently from their husbands or male relations, dispose of their property in legal wills if they had no heirs, and women could represent themselves and bear witness in court by age 14 and arrange for their own marriages by age 20. As a consequence, male-preference primogeniture was the practiced succession law for the nobility.