The Cathedral of St Andrew was built in 1158 and became the centre of the Medieval Catholic Church in Scotland as the seat of the Archdiocese of St Andrews and the Bishops and Archbishops of St Andrews. It fell into disuse and ruin after Catholic mass was outlawed during the 16th-century Scottish Reformation. It is currently a monument in the custody of Historic Environment Scotland. The ruins indicate that the building was approximately 119 m long, and is the largest church to have been built in Scotland.
The west end was blown down in a storm and rebuilt between 1272 and 1279. The cathedral was finally completed in 1318 and featured a central tower and six turrets; of these remain two at the east and one of the two at the western extremity, rising to a height of 30 metres. On the 5th of July it was consecrated in the presence of King Robert I, who, according to legend, rode up the aisle on his horse.
A fire partly destroyed the building in 1378; restoration and further embellishment were completed in 1440.
In June 1559 during the Reformation, a Protestant mob incited by the preaching of John Knox ransacked the cathedral; the interior of the building was destroyed. The cathedral fell into decline following the attack and became a source of building material for the town. By 1561 it had been abandoned and left to fall into ruin.
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.