The Dalriadic Gaels began to influence the islands towards the close of the Pictish era, perhaps principally through the role of Celtic missionaries, as evidenced by several islands bearing the epithet "Papa" in commemoration of these preachers. Before the Gaelic presence could establish itself the Picts were gradually dispossessed by the North Germanic peoples from the late 8th century onwards. The nature of this transition is controversial, and theories range from peaceful integration to enslavement and genocide. It has been suggested that an assault by forces from Fortriu in 681 in which Orkney was "annihilated" may have led to a weakening of the local power base and helped the Norse come to prominence.

Norwegian rule

thumb|alt=A page from an illuminated manuscript shows two male figures. On the left, a seated man wears a red crown and on the right, a standing man has long fair hair. Their right hands are clasped together.|According to the [[Orkneyinga saga|Orkneyinga Saga, Harald Fairhair (on the right, with fair hair) took control of Orkney in 875. He is shown here inheriting his kingdom from his father Halfdan the Black, in an illustration from the Flateyjarbók.]]

Both Orkney and Shetland saw a significant influx of Norwegian settlers during the late 8th and early 9th centuries. Vikings made the islands the headquarters of their pirate expeditions carried out against Norway and the coasts of mainland Scotland. In response, Norwegian king Harald Fairhair (Harald Hårfagre) annexed the Northern Isles, comprising Orkney and Shetland, in 875 (it is clear that this story, which appears in the Orkneyinga Saga, is based on the later voyages of Magnus Barelegs and some scholars believe it to be apocryphal). Rognvald Eysteinsson received Orkney and Shetland from Harald as an earldom as reparation for the death of his son in battle in Scotland, and then passed the earldom on to his brother Sigurd the Mighty. Sigurd went on to conquer northern parts of mainland Britain in the late 9th century, including Caithness and Sutherland.

However, Sigurd's line barely survived him and it was Torf-Einarr, Rognvald's son by a slave, who founded a dynasty that controlled the islands for centuries after his death. He was succeeded by his son Thorfinn Skull-splitter and during this time the deposed Norwegian King Eric Bloodaxe often used Orkney as a raiding base before being killed in 954. Thorfinn's death and presumed burial at the broch of Hoxa, on South Ronaldsay, led to a long period of dynastic strife.

thumb|left|alt=A group of warriors in medieval garb surround two men whose postures suggest they are about to embrace. The man on the right is taller, has long fair hair and wears a bright red tunic. The man on the left his balding with short grey hair and a white beard. He wears a long brown cloak.| Artist's conception of [[Olaf I of Norway|King Olaf Tryggvason of Norway, who forcibly Christianised Orkney. The Orkneyinga Saga suggests the islands were Christianised by Olaf Tryggvasson in 995 when he stopped at South Walls on his way from Ireland to Norway. The King summoned the jarl Sigurd the Stout and said, "I order you and all your subjects to be baptised. If you refuse, I'll have you killed on the spot and I swear I will ravage every island with fire and steel." Unsurprisingly, Sigurd agreed and the islands became Christian at a stroke, receiving their own bishop in the early 11th century.

thumb|right|alt=A large church made from red and yellow stone with a square tower and a spire on the tower.|[[St Magnus Cathedral in Kirkwall]]

Thorfinn the Mighty was a son of Sigurd and a grandson of King Malcolm II of Scotland (Máel Coluim mac Cináeda). Along with Sigurd's other sons he ruled Orkney during the first half of the 11th century and extended his authority over a small maritime empire stretching from Dublin to Shetland. Thorfinn died around 1065 and his sons Paul and Erlend succeeded him, fighting at the Battle of Stamford Bridge in 1066. Paul and Erlend quarrelled as adults and this dispute carried on to the next generation. The martyrdom of Magnus Erlendsson, who was killed in April 1116 by his cousin Haakon Paulsson, resulted in the building of St Magnus Cathedral, still today a dominating feature of Kirkwall.

The Scottish crown claimed the overlordship of the Caithness and Sutherland area from Norway in 1098. The jarls thereafter owed allegiance to the Scottish crown for their territory on mainland Britain, which they held as the Mormaer of Caithness, but owed allegiance to the Norwegian crown for Orkney and Shetland. In 1195, the jarls lost control of Shetland when it became a separate lordship.

In 1231 the line of Norse earls, unbroken since Rognvald, 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. Around the same time, the earldom lost the southern part of its territory on mainland Britain when it was made the separate earldom of Sutherland.

thumb|right|alt=Margaret depicted in the [[Lerwick Town Hall|Lerwick Town Hall stained glass window depicting "Margaret, queen of Scotland and daughter of Norway"]]

In 1290, the death of the child princess Margaret, Maid of Norway in Orkney, en route to mainland Scotland, created a disputed succession that led to the Wars of Scottish Independence.