St Andrew's Castle is a picturesque ruin located in the coastal Royal Burgh of St Andrews in Fife, Scotland. The castle sits on a rocky promontory overlooking a small beach called Castle Sands and the adjoining North Sea. There has been a castle standing at the site since the times of Bishop Roger (1189-1202), son of the Earl of Leicester. It housed the burgh’s wealthy and powerful bishops while St Andrews served as the ecclesiastical centre of Scotland during the years before the Protestant Reformation.
The castle's grounds are now maintained by Historic Scotland, and are entered through a visitor centre with displays on its history. Some of the best surviving carved fragments from the castle are displayed in the centre, which also has a shop, but no café (entrance charge).
During the Wars of Scottish Independence, the castle was destroyed and rebuilt several times as it changed hands between the Scots and the English. Soon after the sack of Berwick in 1296 by Edward I of England, the castle was taken and made ready for the English king in 1303. In 1314, however, after the Scottish victory at Bannockburn, the castle was retaken and repaired by Bishop William Lamberton, Guardian of Scotland, a loyal supporter of King Robert the Bruce. The English had recaptured it again by the 1330s and reinforced its defences in 1336, but to no avail. Sir Andrew Moray, Regent of Scotland in the absence of David II, recaptured it after a siege lasting three weeks. Shortly after this, in 1336-1337, it was destroyed by the Scots to prevent the English from once again using it as a stronghold.
It remained in this ruined state until Bishop Walter Trail rebuilt it at the turn of the century. His castle forms the basis of what can be seen today. He completed work on the castle in about 1400 and died within its walls in 1401.
Several notable figures spent time in the castle over the next several years. James I of Scotland (1406-1437) received part of his education from Bishop Henry Wardlaw, the founder of St Andrews University in 1410. A later resident, Bishop James Kennedy, was a trusted advisor of James II of Scotland (1437-1460). In 1445 the castle was the birthplace of James III of Scotland.
During these years, the castle also served as a notorious prison. The castle's “bottle dungeon” is a dank and airless pit cut out of solid rock below the north-west tower. It housed local miscreants who fell under the Bishop's jurisdiction as well as several more prominent individuals such as David Stuart, Duke of Rothesay in 1402, Duke Murdoch in 1425, and Archbishop Patrick Graham, who was judged to be insane and imprisoned in his own castle in 1478.
During the Scottish Reformation, the castle became a centre of religious persecution and controversy. Referring to the bottle dungeon the Scottish reformer, John Knox, wrote, "Many of God's Children were imprisoned here." In 1521 James Beaton, then Archbishop of Glasgow, won the seat of St Andrews and took up residence in the castle. Beaton altered the defences to enable the castle to withstand a heavy artillery attack, which was a threat as tensions grew between English Protestants and Scottish Catholics. In 1538 James Beaton was succeeded by his ambitious and wealthy nephew David Beaton. Cardinal David Beaton's strong opposition to the marriage of Mary, Queen of Scots, with Prince Edward (later King Edward VI), the son and heir of Henry VIII of England, helped to spark renewed fighting in 1544.
Scottish Protestants were increasingly viewed as dangerous turncoats who sided with the English. In 1546 David Beaton imprisoned the Protestant preacher George Wishart (1513-1546) in the castle’s Sea Tower and had him burnt at the stake in front of the castle walls on March 1. Today, brick lettering with his initials marks the spot where he died. In May of that same year, Wishart's friends conspired against the cardinal. On May 26 they gained entry to the castle by disguising themselves as masons when some building work was in progress. After overcoming the garrison, they murdered Cardinal Beaton and hung his body from his window on the front of the castle.
Following this murder, the Protestants took refuge in the castle and formed the first Protestant in Scotland. A long siege was ordered by the Scottish Regent, James Hamilton, 2nd Earl of Arran. In November of 1546 a mine was begun by the attackers which was successfully counter-mined by the defenders. Both the mine and counter-mine cut through solid rock. They were rediscovered in 1879 and remain open to the public today.
During an armistice in April 1547, John Knox entered the castle and served as the garrison's preacher for the remainder of the siege. For a time Knox had the freedom to pass to and from the castle to preach in the parish church. This peaceful interlude came to end, however, when a French fleet arrived and started a devastating artillery bombardment to dislodge the Protestants. This was accompanied by guns from St Salvator's and the cathedral towers. The castle was soon rendered indefensible and the defeated Protestants were taken away: some were imprisoned in France while others, including Knox, were condemned to the galleys.
Following this Protestant defeat, the castle was substantially rebuilt by Archbishop Hamilton, the illegitimate brother of Regent Arran, and successor to Cardinal David Beaton. The castle was rebuilt after the siege by Archbishop John Hamilton, but following his death in 1571 it was mainly occupied by a succession of constables. Parliament separated the castle from the archbishopric in 1606, and it was granted to the Earl of Dunbar, constable since 1603. In 1612 it was returned to Archbishop George Gledstanes, but further attempts to re-establish the former estates of the Archbishop failed. With the eventual success of the Reformation in Scotland, the office of the bishop was increasingly eroded until it was finally abolished by William of Orange in 1689. Deprived of any function, the castle fell rapidly into ruin. By 1656, it had fallen into such disrepair that the burgh council ordered the use of its materials in repairing the pier. The principal remains are a portion of the south wall enclosing a square tower, the "bottle dungeon," the kitchen tower, and the underground mine and counter-mine.