Malcolm II of Scotland (Máel Coluim mac Cináeda) c. 954-1034 was King of Scotland (Alba) from 1005 to 1034. He was the son of King Kenneth II and first cousin of his predecessor, King Kenneth III (Cináed mac Duib), who was murdered by Malcolm at the Battle of Monzievaird in 1005. He was the last king of the House of Alpin.
His rule was contested for ten years during the reign of Kenneth III but Malcolm finally gained the throne after Kenneth's death. It appears that he only ruled part of Scotland during his reign, in opposition to leaders from Moray such as Findláech mac Ruadrí (d. 1020, probably father of Macbeth), and Máel Coluim mac Máel Brigte (d. 1029), both of whom were also called kings of Alba (and therefore Scotland) in the Irish annals, though neither are called kings of Scotland in modern texts. In 1006, Malcolm was defeated by Northumbrian forces at Durham. The English then became preoccupied with the Danish allowing Malcolm to march south, avenging the loss at Durham by winning the Battle of Carham against the Anglo-Saxons in 1018 and, thereby, regaining Lothian. Thirteen years later, however, Canute, king of England, Denmark, and Norway, invaded Scotland, and forced the Scottish king to submit to him (submission was a traditional expression of personal homage). However, Canute seems to have recognised Malcolm's possession of Lothian.
In the west, Malcolm made an alliance with King Owen the Bald of Strathclyde and together they defeated King Canute at the Battle of Carham in 1018. At the same time, the marriage of his daughter to Sigurd the Stout, Norse Earl of Orkney, extended Malcolm's influence to the far north. He battled to expand his kingdom, gaining land down to the River Tweed and in Strathclyde. When King Owen died without an heir, Malcolm claimed Strathclyde for his grandson, Duncan. This caused dissent throughout the kingdom of Strathclyde which resulted in Malcolm's murder at Glamis in 1034. He was buried on the Isle of Iona shortly after.
As the last of the House of Alpin, he did not have any sons to succeed him. He, therefore, arranged good marriages for his daughters. One daughter married Earl Sigurd of Orkney and their son Thorfinn brought the lands of Caithness and Sutherland under the control of the King of Alba. His elder daughter, Bethoc, married the Abbot of Dunkeld and their son became Duncan I(c.1010-1040), who succeeded Malcolm upon his death in 1034.
After Malcolm II's reign, Scottish succession changed to be based on the principle of direct descent. (Previously, succession was determined by tanistry - during a king's lifetime an heir was chosen and known as tanaiste rig - 'second to the king'.)