St Andrews Castle is a ruin located in the coastal Royal Burgh of St Andrews in Fife, Scotland. The castle sits on a small beach called Castle Sands. There has been a castle standing at the site since the times of Bishop Roger (1189-1202). During the Wars of Scottish Independence, the castle was destroyed and rebuilt several times as it changed hands between the Scots and the English.