11. Coming of the Northmen.—Kenneth was followed in turn by Donald, his brother, and Constantine, his son. Their reigns were mainly taken up in fighting with the Northmen, a heathen people of Teutonic race, who infested the seas and plundered the seaboard. From the eighth century downwards they were the scourge alike of English and Celtic Britain, swooping down on the coasts, harrying the lands, and making off with their booty; or, at other times, seizing and settling on great tracts of country. Three countries of modern Europe—Denmark, Norway, and Sweden were peopled by the Northmen. But while it was those from Denmark who chiefly harassed and finally conquered the English, the Norwegians seem to have looked upon Scotland as their own especial prey, attracted doubtless by the likeness between its many isles and inlets and the jagged outline of the larger Scandinavian peninsula. The long narrow lochs of the western coast, like the fiords of Norway, proved convenient harbours for the ships of these pirates. It is towards the close of the eighth century that we first hear of the descents of the Northmen on the Pictish kingdom. It is told how they ravaged all the coast, destroyed the Pictish capital, and haunted the Irish Sea. Their fury was specially directed against churches and religious communities, and Iona did not escape. Again and again it was wasted by fire and sword, its churches plundered, the brethren slain, till at length the abbot was compelled to seek on the mainland a refuge for himself and the relics of the saintly founder. Under Kenneth MacAlpin the supremacy over the Scottish Church was transferred to the monastery of Dunkeld. Under Kenneth's son, Constantine I., a fresh spirit was given to these invasions by the formation of the kingdom of Norway by Harold Harfagra. The petty chiefs displaced by him, who were called Vikings or dwellers on the bays, sought a settlement elsewhere. Several of them founded settlements in Ireland, whence they went to plunder the western shores of Britain. Others took up their quarters in the Orkneys, and the Sudereys or Southern Isles, as the Northmen called those isles that are now known as the Hebrides. Those in the Orkneys were subdued by Harold, who made the islands into an Earldom and gave it to Sigurd, one of his allies. Thorstein, Sigurd's successor, proved a formidable foe to the King of Scots, made himself master of all the north country, pretty nearly answering to the modern counties of Caithness and Sutherland, to which last the Northmen gave its name because it lay south of their island possessions. On Thorstein's death his great earldom fell to pieces. About this time one Cyric or Grig, who is supposed to have been one of the Northern chiefs, seized on the throne and reigned about eighteen years, leaving his name on record as the liberator of the Scottish Church.

12. The Commendation.Constantine II. (900-943), grandson of Kenneth, who came after Grig, commended himself and his kingdom to Eadward, king of the English, in 924. Constantine chose him as "father and lord," that is, he placed himself under his protection, and acknowledged Eadward as mightier than himself. On this compact were based the subsequent claims of the English to the over-lordship of the Scots. This commendation was renewed to Æthelstan, Eadward's successor. But Constantine soon repented of his submission, and a few years later he and the Welshmen of Strathclyde joined the Danes in their attempt to get back Northumberland, from which Æthelstan had expelled them. The allies were utterly routed in the great battle of Brunanburh, in which Constantine's son was slain, in 937. Six years later Constantine exchanged civil for spiritual rule, and retired as abbot to the Monastery of St. Andrews.

13. Annexation of Strathclyde.Malcolm I. (943-954) succeeded Constantine, though not his son, but his kinsman, for the Scots did not adhere strictly to the order of succession which is now customary: though they kept to the royal family, they generally preferred the brother to the son of the last king. The great event of this reign was the annexation of Strathclyde, which had been conquered by the English king Eadmund, and was now granted by him to Malcolm as a territorial fief, held on condition of doing military service by land and sea whenever it should be required. Thus Strathclyde became an appanage of the heir apparent to the Scottish crown. Of the six kings after Malcolm, Induff, Duff, Colin, Kenneth II., Constantine III., and Kenneth III., little is known. They passed their lives and met their deaths in struggles with the Welsh or with their own northern subjects. Under Induff the Scots got Edinburgh, which had been founded by Eadwine of Northumberland.

14. Acquisition of Lothian.Malcolm II., grandson of the first of the name, was the last of the direct line of Kenneth MacAlpin. His reign, which lasted thirty years, is notable from the fact that he managed to get hold of Lothian, the northern part of Northumberland. One of Malcolm's first acts was an invasion of this earldom. Waltheof, the earl, being old and feeble, shut himself up in his castle of Bamborough and let Malcolm advance unresisted. He got as far as Durham, but there he was met and defeated by Uhtred, the vigorous son of the old Earl. Some years later, when his old enemy Uhtred was dead, Malcolm made a second invasion, and took ample revenge for his defeat at Durham in the brilliant victory at Carham, on the banks of the Tweed, in 1018. After this victory the Scots were in possession of Lothian, which Eadulf Cutel, now Earl of Northumberland, was not strong enough to take from them. It has been said that Lothian had been already granted by Eadgar of England to Kenneth III., who petitioned for it on plea of ancient hereditary right. If so, the Scots must have lost it again; but after the victory of Carham they had it and kept it, though their king held it as an English earldom, and did homage for it to the king of the English.

15. Cnut's Invasion.—In 1031 Cnut, the mighty Dane who reigned over Denmark, Norway, and England, came north, and Malcolm met him, acknowledged him as his over-lord, and renewed the agreement which had been made between Constantine and Eadward. Three years after his submission to Cnut, Malcolm died, leaving as his heir Duncan, the son of one of his daughters who had married Crinan, Abbot of Dunkeld. There is a tradition that, to secure Duncan's succession, Malcolm had caused the grandson of Kenneth III. to be murdered. If he did so, this crime defeated its own end, for Gruach, sister of the murdered man, was now the wife of Macbeth, the Mormaer of Moray, one of the most powerful chiefs. Duncan came north to make war on some of these turbulent Maers, and Macbeth seized the opportunity thus offered by the presence of the king in his province, attacked and defeated him in battle, and afterwards slew him in a place called Bothgowan, which it is thought means a smith's hut.

16. Macbeth, 1040-1057.Macbeth must not be looked on as an usurper and murderer. He was the natural supporter of the claims of his wife and Lulach, her son by a former marriage, who, according to the received rule of Gaelic succession, had a better right to the throne than Duncan himself; and no doubt he justified the murder of the young king as lawful revenge for that of his wife's brother. At all events, after he had got the kingdom, he ruled it well and wisely, so that his reign was a time of great national plenty and prosperity, and he and his wife were benefactors of the Church and of the poor, not only at home, but abroad, for it stands on record that they sent alms to the poor at Rome. But he was not left long in peaceable possession, for the father of Duncan, Crinan, Abbot of Dunkeld, got up a rising in favour of his two grandsons, Malcolm and Donald. About the same time Siward, Earl of Northumberland, brought an army against Macbeth, and drove him from the throne, though he got it back as soon as Siward went away. Some years later Siward, whose kinswoman Duncan had married, again took up the cause of his cousin Malcolm, invaded the kingdom and defeated the king in a great battle; and though Macbeth held out for four years longer, he was at last slain at Lumphanan in Aberdeen. Lulach, son of Gruach, died soon after; and though he left a son, called Malsnecte, whose claim was brought up again long afterwards, there was no attempt made at that time to prolong the struggle.

17. English Immigration. Malcolm III., 1057-1093.—The reign of this Malcolm, surnamed Canmore or the great head, is a turning-point in Scottish history, which henceforth ceases to be essentially Scottish; the Celtic manners, language, laws, and customs being changed by the strong English influence brought to bear on them in this and the following reigns. This change was in great measure due to the conquest of England in 1066 by the Normans under William the Conqueror. The Scottish court was the nearest and most natural refuge for those Englishmen who would not yield to the strangers. Thither they flocked in great numbers, and there they found a hearty welcome. Among these exiles came Eadgar the Ætheling, the representative of the West-Saxon kings, and with him his mother and his two sisters Margaret and Christina. Malcolm received them very kindly, and they stayed with him all the winter. In the beginning of his reign Malcolm had invaded England, where Edward the Confessor was then king, and had wasted the shires of York and Northumberland, while Tostig the earl was gone on a pilgrimage to Rome. He now made a second raid of the same sort, although, when William held his court at York two years before, he had sent in his nominal homage to him by the Bishop of Durham. This time he went on behalf of the Ætheling, and harried the districts of Cleveland and Durham, which had already been wasted by William. His progress was marked by every species of cruelty, neither churches nor children were spared, and the Scots brought back so many captives that English slaves were to be found even in the very poorest households. Meanwhile Eadgar, who had taken part in two or three risings in England, again sought the protection of the Scottish court, and shortly after Malcolm succeeded in persuading Margaret to become his wife. He had before this been married to Ingebiorg, widow of Earl Thorfin of Orkney, and had one son, Duncan.

18. William's Invasion.—In 1072 William came north with a fleet and an army to avenge Malcolm's raid. He went as far as Abernethy on the Tay, the former Pictish capital, and there Malcolm met him and acknowledged William as overlord, by becoming his man or vassal, giving hostages, among whom was his own son Duncan, as warrants for his good faith. But some years later Malcolm took advantage of William's absence in Normandy to harry his kingdom again as far as the Tyne, bringing back both spoil and captives. The Conqueror's eldest son, Robert, came north to avenge this invasion, but happily he and Malcolm came to terms without any more bloodshed. This peace was not broken till 1092, when Malcolm again invaded England. The excuse for this was that his brother-in-law, the Ætheling, had been turned out of the retreat in Normandy granted to him by the Conqueror. William Rufus, who now sat on his father's throne, marched into Lothian, where peace was again made by the mediation of Robert and Eadgar. Malcolm renewed his homage, and William renewed the grant made by his father of certain manors and a yearly payment of twelve marks. But William did not keep to the terms of the treaty, and when Malcolm complained of this breach of good faith he was summoned to appear before the English court at Gloucester. He went, but soon came away again, justly incensed at the insulting way in which he was treated by being put on the same level as the Norman barons. For the fifth time Malcolm entered England at the head of an army, but from this expedition there was no triumphant return, for the king and his son were slain on the banks of the Alne, and the host that had followed them fled in great confusion.

19. Margaret's Reforms.—The disaster did not end with the death of the king, for the good Queen Margaret, who was then at Edinburgh, died of grief almost immediately after hearing the sad tidings. This good woman, whose many merits have won for her the title of saint, was the chief worker in the revolution which was being silently wrought in the manners of the court, and of the people, and in the government of the Church and of the State. The influence which her piety and learning gave her over her husband and his people was used to soften their fierceness, and to win them from their own half-savage ways to the customs of more civilized countries. She is said to have introduced silver plate at court, and many other luxuries of which the Scots had hitherto been ignorant; she encouraged literature and commerce, but she chiefly busied herself in reviving the state of religion, which had sunk to a very low ebb. The Church had fallen from its ancient purity and zeal, and had become a prey to many singular abuses. The abbotships were hereditary in the great families, and were often held by laymen, and the religious foundations were in the hands of a body of irregular clergy called Culdees, from two Latin words meaning 'servants of God.' Margaret called a council of the clergy and spoke to them herself, her husband acting as her interpreter, and did her best to make them give up their peculiarities and give in to the usages of the rest of Christendom. She rebuilt the church of Iona, which had suffered so terribly at the hands of the Northmen, and founded a new church at Dunfermline, in which she and her husband were buried.

20. Disputed Succession. Donald, 1093-1097.—The death of the King and of his son Eadward, who had been recognized as heir-apparent, threw the kingdom into confusion; and the Gaelic party, who had looked on with disgust and jealousy at the changes of the last reign and at the displacement of the Gaelic chiefs by the English immigrants, elected Donald Bane, Malcolm's brother, to the vacant throne. Meanwhile Duncan, the son of Malcolm and Ingebiorg, his first wife, prayed William of England to aid him in recovering his father's kingdom, which he promised to hold as an English fief. His suit was granted, and with the help of an English and Norman army he drove out his uncle and reigned a few months. But Donald, with the help of Eadmund, the eldest surviving son of Malcolm and Margaret, once more got the upper hand, murdered Duncan, exiled the rest of the family, and kept possession of the throne for three years. At the end of that time Eadgar the Ætheling was sent north with an English army, and placed his nephew Eadgar on the throne on the same terms as those which had been granted to Duncan. Donald Bane was taken, and, after the cruel custom of the time, his eyes were put out before he was cast into prison. Eadmund died a penitent in an English monastery.