By the time Malcolm II (Máel Coluim mac Cináeda) came to power in 1005 Scotland was still divided into separate kingdoms.
The Kings of Strathclyde ruled expanses of the south-west, the Mormaer of Moray controlled territories around the Great Glen, while most of the west coast and Hebrides were still in the grip of Norse and Gaelic rulers.
Malcolm's rule (1005 - 1034 AD) was characterised by two major aims. Firstly he wanted to secure his family's right of succession to throne. Secondly he desired to expand the territory of his kingdom.
The manner in which Malcolm became king gave many clues as to his style of kingship afterwards.
Since the days of Kenneth I (843-858 AD), the different strands of the MacAlpin clan had dominated proceedings. Dissent and out-right conflict between rival claimants from the disparate MacAlpin clan was far from unusual.
In such an instance, Malcolm seized control of the throne in 1005 after defeating and killing Kenneth III, his own cousin, at the battle of Monzievaird, near Crieff.
Following his inauguration as king, Malcolm set about eliminating possible claimants to the throne to give his own offspring a better chance of succession after his death.
The scant records available suggest that Malcolm fathered three daughters. While they had married well into powerful families, other rivals would have had more direct claims to the throne. Malcolm attempted to tip the odds in his family's favour by removing the opposition. Notable casualties included the grandson of Kenneth III.
After Malcolm's death at Glamis in 1034, his grandson succeeded to the throne to become Duncan I of Scotland.
Malcolm's murderous scheme to remove rival claimants to the throne appeared to be successful as the succession of Duncan was unchallenged.
After ruling for only 5 years, however, Duncan was killed in battle at Pitgaveny, near Elgin, by Macbeth (Mac Bethad mac Findlaích). Centuries later this episode of Scottish history would inspire a certain William Shakespeare to write a play loosely based on the events.
A powerful of Mormaer of Moray, Macbeth had married well strategically by taking a granddaughter of Kenneth III as a wife and thereby securing for himself a strong claim to the throne. Further, some documents claim Macbeth was directly related through his mother's bloodline to King Malcolm II.
Macbeth's ambitions were realised and he seized the throne in much the same manner as Malcolm II had - through slaughter. For all his efforts at removing rival claimants, it seems Malcolm II had missed one rather important one.
Macbeth himself was later defeated and killed in battle at Lumphanan by Duncan's son, Malcolm, who later succeeded to the throne as Malcolm III.
Malcolm II was successful in defending and expanding the realm of his power during his lifetime.
Malcolm fought several battles against the Norse settlers in the north of Scotland with mixed results but his true success came further south. The Lothian area had been contested bitterly between the Kings of the Scots and the Kings of Northumberland for many years. After a failed attack on Durham in the early years of his reign, Malcolm had better success in 1016.
Joining forces with the King of Strathclyde, Malcolm defeated the Northumbrians at the Battle of Carham. After the battle, Malcolm managed to tighten his grip on the Lothian area, effectively securing it as part of his realm.