section_path: Northern Europe/Scotland/Kings of the Isles
section_name: Kings of the Isles
paragraph_text: Kings of the Isles
  
  In 876, the Norse-Gaels of Mann and the Hebrides rebelled against Harald. A fleet was sent against them led by Ketil Flatnose to regain control. On his success, Ketil was to rule the Sudreys as a vassal of King Harald. His grandson, Thorstein the Red, and Sigurd the Mighty, Jarl of Orkney, invaded Scotland and were able to exact tribute from nearly half the kingdom until their deaths in battle. Ketil declared himself King of the Isles. Ketil was eventually outlawed and, fearing the bounty on his head, fled to Iceland.
  
  The Norse-Gaelic Kings of the Isles continued to act semi independently, in 973 forming a defensive pact with the Kings of Scotland and Strathclyde. In 1095, the King of Mann and the Isles Godred Crovan was killed by Magnus Barelegs, King of Norway. Magnus and King Edgar of Scotland agreed on a treaty. The islands would be controlled by Norway, but mainland territories would go to Scotland. The King of Norway nominally continued to be king of the Isles and Man. However, in 1156, The kingdom was split into two. The Western Isles and Man continued as to be called the "Kingdom of Man and the Isles", but the Inner Hebrides came under the influence of Somerled, a Gaelic speaker, who was styled 'King of the Hebrides'. His kingdom was to develop latterly into the Lordship of the Isles.
  
  In eastern Aberdeenshire, the Danes invaded at least as far north as the area near Cruden Bay.
  
  The Jarls of Orkney continued to rule much of northern Scotland until 1196, when Harald Maddadsson agreed to pay tribute to William the Lion, King of Scots, for his territories on the mainland.
  
  The end of the Viking Age proper in Scotland is generally considered to be in 1266. In 1263, King Haakon IV of Norway, in retaliation for a Scots expedition to Skye, arrived on the west coast with a fleet from Norway and Orkney. His fleet linked up with those of King Magnus of Man and King Dougal of the Hebrides. After peace talks failed, his forces met with the Scots at Largs, in Ayrshire. The battle proved indecisive, but it did ensure that the Norse were not able to mount a further attack that year. Haakon died overwintering in Orkney, and by 1266, his son Magnus the Law-Mender ceded the Kingdom of Man and the Isles, with all territories on mainland Scotland to Alexander III, through the Treaty of Perth.
  
  Orkney and Shetland continued to be ruled as autonomous Jarldoms under Norway until 1468, when King Christian I pledged them as security on the dowry of his daughter, who was betrothed to James III of Scotland. Although attempts were made during the 17th and 18th centuries to redeem Shetland, without success, and Charles II ratifying the pawning in the Act for annexation of Orkney and Shetland to the Crown 1669, explicitly exempting them from any "dissolution of His Majesty's lands", they are currently considered as being officially part of the United Kingdom.