were probably independent rulers. The imposition of direct Norwegian rule at the end of this century brought this to a close in the north and unusually, from c. 1100 onwards the Norse jarls of the Northern Isles owed allegiance both to Norway for Orkney and to the Scottish crown through their holdings as earls of Caithness. In 1231 the line of Norse earls, unbroken since Rognvald Eysteinsson, ended with Jon Haraldsson's murder in Thurso. The Earldom of Caithness was granted to Magnus, second son of the Earl of Angus, whom Haakon IV of Norway confirmed as Earl of Orkney in 1236. In 1379 the earldom passed to the Sinclair family, who were also barons of Roslin near Edinburgh although Orkney and Shetland remained part of Norway for a century more. The situation in the Suðreyar was more complex. Different kings may have ruled over very different areas and few of them can be seen as exerting any kind of close control over this "far-flung sea kingdom". The Uí Ímair were certainly a powerful force from the late 9th to the early 11th centuries with dynasts such as Amlaíb Cuarán and Gofraid mac Arailt claiming kingship of the Isles. Norse sources also list various rulers such as jarls Gilli, Sigurd the Stout, Håkon Eiriksson and Thorfinn the Mighty as rulers over the Hebrides who were vassals of the Kings of Norway or Denmark. The dates from the Irish and Norse sources do not significantly overlap, but it is not clear if these are records of competing empires, or reflect Uí Ímar influence in the south and direct Norse rule in the north, or both. Furthermore, two records in the Annals of Innisfallen may suggest that the Western Isles were not "organised into a kingdom or earldom" at this time but rather that they were "ruled by assemblies of freeholders who regularly elected lawmen to preside over their public affairs". The Annals of the Four Masters entries for 962 and 974 hint at a similar arrangement. Crawford (1987) suggests that influence from the south rather than the north was "usually predominant" whilst admitting that the islands probably formed "groups of more or less independent communities". Godred Crovan became the ruler of Dublin and Mann from 1079 and from the early years of the 12th century the Crovan dynasty asserted themselves and ruled as "Kings of Mann and the Isles" for the next