The viscount of Narbonne was the secular ruler of Narbonne in the Middle Ages. Narbonne had been the capital of the Visigoth province of Septimania, until the 8th century, after which it became the Carolingian Viscounty of Narbonne. Narbonne was nominally subject to the Carolingian counts of Toulouse but was usually governed autonomously. The city was a major port on the Mediterranean Sea. In the 12th century, Ermengarde of Narbonne (reigned 1134 to 1192) presided over one of the cultural centers where the spirit of courtly love was developed. In the 15th century Narbonne passed to the County of Foix and in 1507 to the royal domain of France.