Following the collapse of the Roman Empire, Cantabria regained its independence from the rule of the Visigoths. In 574, King Liuvigild attacked Cantabria and managed to capture the south of the country, including the city of Amaya, where he established a Visigothic province called the Duchy of Cantabria (see picture), which would serve as a limes or frontier zone to contain the Cantabri as well as their neighbors the Vascones. To the north of this cordon, however, the Cantabri continued to live independently until the Arab invasion. In 714, a mixed Arab/Berber army of Muslim Moors invaded the upper valleys of the Ebro and succeeded in capturing Amaya, the Cantabrian capital, forcing the Cantabrians back to their traditional frontiers, where they joined forces with the Kingdom of Asturias.