Its origins date back to the early 8th century, when Muslims took control of the northern territories of the Visigothic Kingdom of Hispania and modern-day northeastern Spain and southern France. After turning back deep Muslim incursions, the Frankish Empire under the Carolingian monarchs, created the Marches of Gothia and Hispania progressively. This was achieved by taking over the territories of Septimania that the Moors invaded in the 8th century and from these, those territories surrounding the Pyrenees and specially the northeast of the Iberian Peninsula. These eastern Iberian territories were repopulated with people from the March of Gothia.
This resulted in the formation of an effective buffer zone between the Muslim Iberian peninsula and the Duchy of Aquitaine and Provence.