After spending a year in St Andrews, I had yet to visit the castle. It's tradition for students to jump over the gate one night and drink in one of the towers or dungeons, but I hadn't even done this. I did walk by it regularly and read every night on a bench that overlooked the castle, but I never actually went inside. Since I had a membership to Historic Scotland, I could get in for free, though. My last day in St Andrews I made it a point to go around the castle and cathedral to take some pictures and get my money's worth for the Historic Scotland membership.
The castle was more of a fortified home and not really a military instillation for the army. Thought it may look small on the outside, there was actually a lot of room on the inside once I realized that it wasn't built to stop an invading army from taking St Andrews. Close to the cathedral and all of the other official Church buildings associated with this complex, this fortification gave the wealthy bishops and archbishops a secure place to keep their gold and other possessions while ruling over the Catholic Church's wealthy holdings in western Scotland. It's actually amazing to think of how powerful and wealthy these clergy would have been for their age. The king would probably not have the commoner's strict allegiance, and the lower barons and lords would have been more popular and powerful. However, the clergy and Catholic Church had most of the people's allegiance, and the Pope had huge sway on politics. Since Scotland had a direct link to Rome with St Andrews Cathedral, they could bypass England and have more control over their own politics. In this Scottish political power play between the commoners, the lords, the clergy, and the king, whoever controlled St Andrews Cathedral and this castle had influential sway on the course of Scottish history.
Though the castle was more of a residence than a practical fort for a large army, it did see some battles, especially during the Reformation. After murdering an archbishop, Protestant reformers took the castle and resisted attack from the English. In order to weaken the castle walls, the Catholics tried to dig a tunnel mine under the walls so that they would collapse. This form of siege warfare was very common during the medieval age. In order to counter this mine, the Protestants dug a counter mine in order to block the Catholics' advance. After multiple failed attempts at finding the enemy tunnel, the Protestants finally dug a tunnel that intersected the enemy tunnel and fought back the invaders. This tunnel, along with several failed tunnels, are some of the best preserved mines and counter mines from medieval Europe. The Protestants did not have cannons in the fort because the Crown did not allow any non-royal fort or castle to have cannons unless there was an ongoing foreign war. However, the Catholics were able to get some cannons and besiege the castle, and they placed multiple cannons on top of the steeples of the cathedral and other chapels in order to fire upon the Protestants. Also, French Catholics sent a fleet into St Andrews bay in order to block passage from the sea. Due to the fort's destruction and gradual starvation, the besieged Protestants finally surrendered. Later, with John Knox and help from the English Protestants, St Andrews and Scotland became Protestant and developed Presbyterianism.
Here are some more cool factoids about the castle: James I of Scotland grew up in the castle and studied here under Bishop Henry Wardlaw, founder of the University of St Andrews. James II also studied here under Bishop James Kennedy, who was King Robert III's grandson and founder of St Salvator's College. James III was born here. King Edward I of England held his parliament here while he was trying to conqueror Scotland in the early 1300s.
I was very impressed with the castle's small museum. I've heard that Scotland has done a lot over the past decade to improve their tourist destinations, and this museum seems to have gone through a recent renovation. The displays were very relevant and easy to understand.
As usual, I took a bunch of photographs, some of which I've posted on this blog. I also took photos of all the museum placards and transcribe what they say about the castle here:
The bishops, later archbishops, of St Andrews occupied a leading position in the Scottish church and were also among the great men of the kingdom. Bishop Roger de Beaumont, chancellor of Scotland, built the castle around 1200 to provide essential protection for himself and his property and as a reflection of his status. However, most of what still stands today dates from later periods because the earlier structure was destroyed during the Wars of Independence in the first half of the 14th century. After 1385 the new bishop Walter Trail rebuilt the castle from its foundations; the pentagonal layout he established remained the basis for all its later developments.
During the 15th and 16th centuries the castle reached its peak as the splendid residence of one of the most powerful men in the kingdom. The bishops and archbishops of St Andrews were closely associated with the Scottish royal court and often entertained noble and royal guests. For this purpose the main rooms would have been lavishly adorned with decorative trappings suitable to the occasion, exuding a magnificence virtually unmatched in Scotland at this time. The heyday of the castle was probably in the time of Archbishop James Beaton (1521 - 1539), renowned for his extravagant hospitality, and his nephew, David Beaton, who succeeded him and became a major political figure during the minority of Mary Queen of Scots.
On March 1, 1546, in front of the castle walls, the Protestant preacher George Wishart was burned for heresy at the behest of Cardinal David Beaton, Archbishop of St Andrews. By this act, the cardinal, an extremely powerful figure in Scotland, hoped to counter the religious and political threat posed to his authority by the growing number of reformers. In the early hours of May 29, 1546, St Andrews castle was seized y a group of local gentlemen opposed to Cardinal Beaton. These men met in the cathedral burial ground before five and six o' clock in the morning before moving towards the castle. Workmen were already busy around the castle walls, and the drawbridge had been lowered to allow building materials inside. Disguised as masons, the conspirators were able to advance unnoticed. One man was able to distract the porter at the outer gate while others reached the main entrance. When the alarm was eventually raised, the porter was murdered and thrown into the ditch. The workmen and guards fled, and the castle was taken. On hearing the commotion outside, Cardinal Beaton looked anxiously out of his chamber window. After realizing that the castle had been overrun, he hurriedly hid his gold while his servant barricaded the door against the oncoming attackers. When the conspirators threatened to burn their way in, the door was opened, but despite pleading for his life, Beaton was slain. Later his body was displayed from one of the artillery blockhouses he had built. After the murder of Cardinal Beaton, the castle was besieged by the Regent, the Earl or Arran. Toward the end of 1546 he tried to break through the defenses by attempting to mine a tunnel beneath the gate tower. This ploy failed because those in the castle responded by digging a countermine to intercept the Regent's mine. The counter miners could only see the entrance point of Arran's mine and were guided solely by the noises made by his miners underground. The Earl of Arran could do very little at first to recapture the castle because his son was inside. After months of stalemate, an armistice was agreed in December 1546, and in the following April John Knox was able to join those under siege. While the peace lasted Knox was given freedom to preach in the parish church in St Andrews, but in 1547 a French fleet arrived to support the Regent, leading to a massive artillery onslaught which caused enormous damage. Those inside surrendered. Some were imprisoned in France, while others, including Knox, were condemned to work in galleys.

Hamilton's Facade, which was built after the siege damage
in 1546-47. The entrance was four stories high and extended
into the ditch surrounding the castle. This new front is important
in Scottish architectural history because it was one of the earliest
non-royal buildings to be built in the new continental Renaissance
style with heavy influences from France.

A well in the middle of the courtyard inside the castle.
[Image Deleted: see http://peregrinatorphoto.blogspot.com/]
View of Castle Sands looking out over the North Sea.
West Sands and the Old Course are in the distance.

Inside the counter-mine.
This tunnel reminded me of the
video game Oblivion, for those of you
who know what I'm talking about.

These steps were part of the Catholics' mine.
The cathedral is a 3 minute walk from the castle and included a large complex or buildings that included more than just the traditional cathedral. Basically, these buildings were the equivalent of administrative offices for the Catholic Church in Scotland, and many monks lived here. Because these facilities housed a lot of precious goods, including relics that may really been from St Andrew (and not just fraudulent copies as most relics in Europe were) and some items from past Scottish kings, a large half-mile long wall surrounded the cathedral complex. Today this wall is the longest and best preserved of all medieval walling in Scotland. This cathedral was a major place of pilgrimage for medieval Catholics, who would camp just outside the front door of the cathedral and wait to walk into the long and narrow passage. However, they would only get to see the actual relics on St Andrew's Day when the bishops would parade them around the town.
Here's some more information about the cathedral complex that I took from placards in the museums:
During the 10th and 11th centuries the Church in Scotland seems to have fallen out of step with mainstream developments in the European Church. However, St Margaret, a Saxon princess who married King Malcolm II in about 1070, started a process which was to reverse this trend. In particular, she established a Benedictine Priory at Dunfermline and encouraged pilgrimages to St Andrews. Her sons were able to do even more to help the church in its process of renewal. At St Andrews the most important changes were introduced by Bishop Robert who was appointed by St Margaret's third son, Alexander I, in 1123. It is likely that Robert built much of St Rule's church as his cathedral sometime after his consecration in 1127; the tower and the chancel still stand in the grounds of the larger cathedral which eventually replaced it. Despite opposition from the existing clergy of St Andrews, Bishop Robert also introduced a chapter of Augustine canons to serve the cathedral in the 1140s.
St Rule's church proved too small a cathedral, and about 1160 Bishop Arnold started work on an ambitious project to build a much grander and more appropriate building. However, this magnificent new cathedral was not to be completed for over a century. By the late 1270s, in the time of William Wishart, who became bishop in 1271, much of the main building was nearing completion. Before it was finished, however, the west gable was blown down during a great storm. Whishart began rebuilding immediately but died soon after. Eventually, the cathedral was completed and consecrated by Bishop de Lamberton in 1318, but the building was to suffer once more when it was damaged by fire in 1378.
About 1144 Bishop Robert had founded a community of Augustinian canons to serve as his cathedral chapter. These canons provided services, maintained the building, and performed administrative duties as well as living according to their monastic rule around the cloister to the south of the cathedral. The Augustinians traditionally also had intellectual interests, and after the formal establishment of the University of St Andrews in 1413 several of the canons came to play an active role there. In 1512 St Leonard's College was founded by the head of the community, Prior John Hepburn. The Dominicans, or Blackfriars, probably came to St Andrews about 1464 and came to be closely associated with the University. Their buildings were largely destroyed during the Reformation; only a side-chapel whose remains dates from a rebuilding operation of about 1576 stands near Madras College on South Street.
[Image Deleted: http://peregrinatorphoto.blogspot.com/]
The tower on the right is St Rule's Tower, which
was part of the original church that ended up being
too small for the Catholic Church. Tourists can pay a
pound to climb to the top. I couldn't do it on this day
because some repairs were going on.
[Image Deleted: see http://peregrinatorphoto.blogspot.com/]
Entrance into the main part of the cathedral
through the west gable, which collapsed just
before construction was finished.
Pilgrims would have camped outside these
doors while waiting to get inside.
[Image Deleted: see http://peregrinatorphoto.blogspot.com/]
These are the old bases of the pillars that held
up the roof. The pilgrims were allowed to use
the outside aisles when walking towards or
away from their main destination, the
relics of St Andrew near the eastern steeples,
seen in the distance. This was a very long yet
narrow cathedral, and there would not have been
any pews for the people to use. Instead, they were
just here to walk towards and then away from the
relics, which they would probably not have seen.

Almost every cathedral is full of graves under
the floors, but few people realize they are actually
walking on top of the dead. This photo shows
the original height of the floor (the huge piece of slate)
and where bishops would have been buried.
Creepy, huh?
The 'Holy of Holies' would have been near here,
and this area would have housed the relics of
St Andrew and some Scottish kings.
[Image Deleted: see http://peregrinatorphoto.blogspot.com/]
This photo is taken from outside the main
cathedral but from inside one of the old
administrative buildings for the Scottish
Church. Again, important clergymen
would have been buried here, so their
graves are visible. During the Reformation
the Protestants destroyed everything and
removed the corpses.
[Image Deleted: see http://peregrinatorphoto.blogspot.com/]
This photo shows the lowest level of the old cloister that the
Augustinian monks would have used. Cathedrals usually
formed a 't' shape for the cross, and this building would
have been snugly built and connected to the southwestern
edge of the cathedral's 't'. The door on the far left led into
the main cathedral, where the monks would have performed
several services for themselves and for the pilgrims.
Other than the ruined cathedral, the St Andrews Sarcophagus is one of the most famous and historically significant items in St Andrews, even if it doesn't look like much at first. Any good history book on medieval Scotland should have a photograph of this old coffin. Instead of explaining in my own words, I'll just rewrite what the placard said: The carved monument before you is one of the finest examples of early medieval sculpture in Europe. Detailed art-historical research has concluded that this was a royal burial shrine dating to the late 8th century AD. Although there are other possibilities, it is likely to be a memorial to Oengus, son of Fergus (died in 761) of the powerful Pictish dynasty which had founded an important monastery in St Andrews. The sculpture that you can see in the museum represents almost all we know about the early monastery here. The Pictish mason who carved this monument for the king was a highly skilled artist. Its deeply symbolic design provides an insight into the religious beliefs, political aspirations, and extensive international contacts of Pictish kings in a period that is still referred to by some as the 'Dark Ages.' The St Andrews Sarcophagus is s supreme example of Insular art, a style made up of the native art of the Celts and Anglo-Saxons combined with aspects of Mediterranean art. The freshness of the surviving sculpture tells us that the Sarcophagus stood in a building, presumably a church or a royal mausoleum. It then appears to have been deliberately buried not long after this initial period of display. no complete plans of Pictish churches have yet been discovered although we know that some included decorative carvings. We presume the shrine was prominently placed to the left of the altar, the cross on this end facing the worshipper whilst the large figure fighting the lion looked directly at the altar.

St Andrews Sarcophagus

Close up of the sarcophagus, which shows a hunt.

During my last day in St Andrews, there was a Royal Air Force
air show at Leuchars Air Force Base nearby. I constantly
heard various screaming jets overhead all day, and
I was able to snap this photo of jets in formation
as they passed over St Andrews before going back to the base.