St Andrews 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 burghs wealthy and powerful bishops while St Andrews served as the ecclesiastical centre of Scotland during the years before the Protestant Reformation. In their Latin charters, the Archbishops of St Andrews wrote of the castle as their Palace, signing, apud Palatium nostrum.