The Siege of St Andrews Castle (1546–1547) followed the killing of Cardinal David Beaton by a group of Protestants at St Andrews Castle. They remained in the castle and were besieged by the Governor of Scotland, Regent Arran. However, over 18 months the Scottish besieging forces made little impact, and the Castle finally surrendered to a French naval force after artillery bombardment. The Protestant garrison, including the preacher John Knox were taken to France and used as galley slaves.
October 1546 Arran and the Scottish Privy Council met at St Andrews, and siege operations commenced in earnest. A mine, a tunnel to undermine the Fore Tower or enter the castle, was begun by Regent Arran’s men. The French ambassador Odet de Selve knew about the mine by 10 November, from an 18-day-old eye-witness account. The defenders dug a successful counter-mine to meet it. Both the mine and counter-mines were cut through solid rock.