Dunyvaig Castle was built on top of an ancient fort or dun in the 12th century. Forfeited in 1493, the castle passed to the MacIans of Ardnamurchan. Afterwards the castle was leased to the MacDonalds, then the Campbells and back to the MacDonalds.
In the 17th century Dunyvaig was conquered several times by the English and Scottish armies. The castle was seized in 1647 by the Covenanters and passed into the hands of the Campbells of Cawdor, who held it until 1677, when Sir Hugh Campbell pulled down the castle and moved to Islay House.
Today all that remains of the castle are mainly the ruins of the sixteenth-century castle, although the site includes a thirteenth-century courtyard, and a fifteenth-century keep.
References:The Château de Foix dominates the town of Foix. An important tourist site, it is known as a centre of the Cathars. Built on an older 7th-century fortification, the castle is known from 987. In 1002, it was mentioned in the will of Roger I, Count of Carcassonne, who bequeathed the fortress to his youngest child, Bernard. In effect, the family ruling over the region were installed here which allowed them to control access to the upper Ariège valley and to keep surveillance from this strategic point over the lower land, protected behind impregnable walls.
In 1034, the castle became capital of the County of Foix and played a decisive role in medieval military history. During the two following centuries, the castle was home to Counts with shining personalities who became the soul of the Occitan resistance during the crusade against the Albigensians.