Archbishop James Beaton arranged that his nephew, David Beaton, should be appointed his coadjutor with right of succession. David Beaton became the last Scots Cardinal before the Reformation. He was not a good example, living in open concubinage and using ecclesiastical revenues to enrich his children. In 1546, he arranged the trial and execution for heresy of George Wishart. This provoked popular outrage and the Cardinal was hanged from the window of his own palace.
This was pointed out to me by Jamie McMorrin when I stopped for a tourist photo on the way to a cafe to which we were heading for a late breakfast. The photograph I took includes the window from which the Cardinal was hanged.
A contemporary poet wrote "The Tragedie of the Cardinal" which ended:
As for the Cardinal, I grant,In 1559, John Knox was invited to return to Scotland by the Protestant nobles who were occupying St Andrews. He preached for three days in the Holy Trinity Church. At the end of his preaching, a mob, goaded by the nobles, advanced on the Cathedral with sacks to carry away their loot. The "Historie of the Estate of Scotland" said that they went to
He was the man we weel could want'
And we’ll forget him soon!
And yet I think, the sooth to say,
Although the loon is well away,
The deed was foully done.
purge the kirk and break down the altars and images and all kind of idolatrie...The building was not structurally damaged on this occasion but it was the end of four centuries of Catholic worship there. From then until the mid-18th century the building was used as a quarry for building materials, hence the ruin that is left today.