Built as a residence for King James IV in 1500, it replaced an earlier 12th century castle. It consisted of fortified series of buildings around a courtyard. Only the south range and gatehouse, seen here, survives intact today. The palace was restored in 1887 by the Marquis of Bute and still belongs to the Queen but has been mainted by the National Trust for Scotland since 1952.