During the reign of King Malcolm Canmore (1058-1093) Scotland became an organised kingdom for the first time and an ecclesiastical revolution also took place.
It was mainly through the influence of his wife, Queen Margaret, that the Scottish Church entered into a degree of conformity with practice in England and thus with Rome. During the reigns of Margaret's sons - Alexander I and David I - dioceses were created and the primacy transferred from Dunkeld first to Abernethy and then to Saint Andrews. Monasteries of the Benedictine, Cistercian, Augustinian and other rites began to be established across Scotland, and these differed from their Celtic predecessors in that they were not centres of missionary activity but of devotion and learning.
Clashes with England and Rome
The reign of William the Lion (1165-1214) saw Scotland become feudally subject to England under the Treaty of Falaise in 1174. William had been captured by the English army at Alnwick and the Treaty was the price of his freedom. During this time the Archbishops of York and Canterbury intensified their rival claims to have jurisdiction over Scotland's Church. In 1188 Pope Clement III ended the argument by taking the Scottish Church under his own protection and the following year Richard the Lionheart, King of England, about to set off to the Holy Land on Crusade, revoked the Treaty of Falaise in return for a sum of money.
In the later middle ages there were further clashes with England. Edward I asserted his claim to be Lord Paramount of Scotland and in the Wars of Independence the Church took the side of Sir William Wallace and Robert the Bruce, whom the Bishops recognised as king four years before the victory at Bannockburn.
In doing so the Bishops broke their solemn oaths to King Edward of England and this perjury and the general difficulties of the time once more led to a diminishing of fervour for the religious ideal, and for years the country lay under the weight of the Pope's interdict which cut Scotland off from contact with the wider Church.
Isolation and Signs of Rebellion
Over the next two centuries although the church produced bishops and priests who sought to maintain the Christian ideal throughout the land, there was a gradual growth of lawlessness among the nobles. The greed and corruption that had become inherent in the system was shown by two successive appointments to the Archbishopric of Saint Andrews in the reign of James IV (1473-1513). James, Duke of Ross, and the king's brother, was appointed at the age of 21, and he was succeeded by the king's illegitimate son, Alexander Stewart, who was aged 12.
The withdrawal of the Norman-English nobles had taken away a gentler influence, and this was further diluted by the loss of many of the country's leaders at the Battle of Flodden in 1513, at which the young Archbishop died at his father's side.
When key positions in the Church were bought and sold by kings, nobles and popes it is unsurprising that the moral life of the church declined. Clerical celibacy was not enforced and the monasteries became houses of luxury and laxity.
Long before the Reformation there were signs of rebellion. In 1407 a priest, John Resby, was burned at Perth for teaching that the pope was not the Vicar of Christ and that no one could be who was not personally holy. Many attempts were made to reverse the degeneration of the church and it was discussed at Council after Council. King David II tried by beginning to substitute collegiate churches for monasteries and it was also during this period that universities were established at Saint Andrews (1410), Glasgow (1451) and Aberdeen (1495), each of them by a Bishop.
William Elphinstone, who founded the University of Aberdeen, strove throughout his life to achieve the best for Church and Nation, but such men were the exceptions. More typical was the rivalry between Archbishoprics of Saint Andrews (created in 1474) and Glasgow (created in 1492). The disputes between Archbishop Scheves of Saint Andrews and Archbishop Blackaddar of Glasgow became so virulent that eventually Parliament had to intervene to keep the peace. The unedifying contest further paved the way for the Reformation.