The identity of Duncan's mother is given by the
Orkneyinga saga, which records the marriage of Malcolm and Ingibiorg, and then mentions "their son was Duncan, King of Scots, father of William". Duncan II got his name from that of his grandfather,
Duncan I of Scotland. However, Ingibiorg is never mentioned by primary sources written by Scottish and English chroniclers. She might have been a
concubine or had a marriage not recognized by the Church.
William of Malmesbury calls Duncan an illegitimate son of Malcolm III. This account influenced a number of Medieval commentators, who also dismissed Duncan as an illegitimate son. However, this claim is propaganda reflecting the need of Malcolm's descendants by
Margaret to undermine the claims of Duncan's descendants, the
Meic Uilleim. Duncan was given into the keeping of
William the Conqueror in 1072 as a hostage. The
Annals of Ulster note that the "French went into Scotland and brought away the son of the king of Scotland as hostage" (by French, the text is referring to the
Normans). The context of this event was the initial conflict between Malcolm III and William.
Edgar Ætheling, the last remaining male member of the English royal family, had fled to Scotland in 1068, seeking protection from the invading Normans. Edgar sought Malcolm's assistance in his struggle against William. The relationship was reinforced when Malcolm married Ætheling's sister, Margaret, in 1071. The formal link between the royal house of Scotland and
Wessex and Malcolm's forays in northern England were an obvious threat to William who counter-attacked with a full-scale invasion of southern Scotland in 1072. Malcolm met William in
Abernethy. In the resulting
Treaty of Abernethy, Malcolm submitted to William for Malcolm's lands in England (Cambria and Northumbria) but not for Scotland. Though the facts are not clear, one of the conditions of the agreement may have been that Edgar Ætheling leave the Scottish court. The offering of Duncan, Malcolm's eldest son, as hostage was probably another term of the treaty. Duncan was raised in the Anglo-Norman court of William I, becoming familiar with the culture, education, and institutions of his hosts. He was trained as a Norman
knight and participated in William's campaigns. In 1087, William died, and his eldest surviving son
Robert Curthose succeeded him as
Duke of Normandy. According to
Florence of Worcester, Robert released Duncan from custody and had him officially knighted. Duncan was allowed to leave the
Duchy of Normandy. He chose to join the court of
William II of England, younger brother to Robert. His father, who by then had many sons, appears to have made no effort to obtain Duncan's return. Edward, the eldest paternal half-brother of Duncan, had been designated as heir in his absence. Duncan notably chose to stay with his adoptive culture, partly due to the influence of 15 years of Norman life and partly in pursuit of personal wealth and glory, though he may always have had in mind that one day he would become Scotland's king, like his father and grandfather. Edward was mortally wounded in the same fight. Malcolm's queen Margaret died days after receiving the news of their deaths from her son Edgar. The resulting power vacuum allowed
Donald III of Scotland (Domnall Bán mac Donnchada), younger brother of Malcolm, to seize the throne. The new monarch represented the interests of "a resentful native aristocracy", driving out the Anglo-Saxons and Normans who had come to the court of Malcolm and Margaret. The event allowed Duncan to lay claim to the throne, attempting to depose his uncle. He had the support of William II, in exchange for an oath of fealty to his patron. == Marriage ==