Canute was the only legitimate son of King Eric I of Denmark (died 1103) and Boedil Thurgotsdatter, but as a minor he was bypassed in the election of 1104. He grew up in close contact with the noble family of Hvide, who were later on to be among his most eager supporters. In 1115, his uncle, King Niels of Denmark, placed him in charge of the Duchy of Schleswig ("jarl af Sønderjylland") in order to put an end to the attacks of the Slavic Obotrites. During the next fifteen years, he fulfilled his duty of establishing peace in the border area so well that he was titled Duke of Holstein ("Hertug af Holsten") and became a vassal of the Holy Roman Empire.