The Fairhair Dynasty is traditionally regarded as the first royal dynasty of the united kingdom of Norway.
It was founded by Harald I of Norway, known as Haraldr hinn hárfagri (Harald Fairhair or Finehair), the first King of Norway (as opposed to "in Norway"), who defeated the last resisting petty kings at the Battle of Hafrsfjord in 872.

According to the traditional view, after Harald Fairhair first unified the kingdom, Norway was inherited by his agnatic (male) descendants.
In the 13th century, this was codified in law.
Unlike other Scandinavian monarchies and Anglo-Saxon England, Norway was never an elective monarchy.

However, in the first centuries after Harald Fairhair, there were several periods during which the country was effectively ruled not by a king but by one of the Jarls of Lade, (Old Norse Hlaðir), from the northern part of Norway.
The first such period was from about 975 to about 995 under Haakon Sigurdsson (Hákon Sigurðarson, often called 'Jarl Haakon').
Also, although Harald Fairhair's kingdom was the kernel of a unified Norway, it was still small and his power centre was in Vestfold, in the south.
And when he died, the kingdom was divided between his sons.
Some historians put emphasis on the actual monarchical control over the country and assert that Olav II (Olav the Stout, who later became St. Olav), who reigned from 1015, was the first king to have control over the entire country.
He is generally held to be the driving force behind Norway's final conversion to Christianity and was later revered as Rex Perpetuum Norvegiæ (Latin: eternal king of Norway).
Some provinces did not actually come under the rule of the Fairhair kings before the time of Harald III (Harald Hardrada, r. 1046–1066).
Either of these may therefore be regarded as further unifiers of Norway.
And some of the rulers were nominally or actually vassals of the King of Denmark, including Jarl Haakon.

It is undisputed that later kings, until Magnus IV (Magnus the Blind, r. 1130–1135 and 1137–1139), were descended from Harald Hardrada: the 'Hardrada dynasty'.
However, many modern historians doubt whether Harald III was in fact descended from Harald Fairhair (for example questioning the identification of Halfdan in Hadafylke with the father of Sigurd Syr or Harald Fairhair's fathering of Sigurd Hrise on a Sami girl called Snæfrid) and whether he in fact made such a claim, or whether this lineage is a construction from the 12th century.
Sverre Sigurdsson's claim to be the son of Sigurd Munn is also usually considered to be dubious, which would make Inge II (Inge Bårdsson) possibly the last king of a dynasty.

Scholars now consider the Fairhair dynasty at least partly the product of medieval invention.
One motive would be to increase the legitimacy of rulers by giving them a clear royal ancestry dating back to the foundation of the kingdom.
Another was to provide pedigrees for other people by connecting them to the royal house.
Versions of the royal descent are preserved in various works by Icelandic skalds and historians, some based on now lost works: Þjóðólfr of Hvinir's Ynglingatal, in Nóregs konungatal (which preserves information from a lost work by Sæmundr fróði), and at greatest length in Snorri Sturluson's Heimskringla (which preserves information from a now lost version of Ari Þorgilsson's Íslendingabók).
These differ in some respects.
Joan Turville-Petre explored the relationship between them and argued that the original aims were to establish a framework of regnal years for dating and to connect Icelandic chieftains to them, and that the Vestfold origin of the dynasty was deliberately altered and they were connected to the Swedish Ynglings rather than the Skjǫldungs to fit Icelandic tradition.
Claus Krag argued that an important motive was to establish a hereditary claim to Viken, the region around Oslo, because the area had been paying taxes to the King of Denmark.

Turville-Petre speaks of a "decisive reconstruction of Harald [Hardrada]'s ancestry probably carried out by Icelanders, some two hundred years after his time" which made
The Fairhair Dynasty is traditionally regarded as the first royal dynasty of the united kingdom of Norway. It was founded by Harald I of Norway, known as Haraldr hinn hárfagri (Harald Fairhair or Finehair), the first King of Norway (as opposed to "in Norway"), who defeated the last resisting petty kings at the Battle of Hafrsfjord in 872.
According to the traditional view, after Harald Fairhair first unified the kingdom, Norway was inherited by his agnatic (male) descendants. In the 13th century, this was codified in law. Unlike other Scandinavian monarchies and Anglo-Saxon England, Norway was never an elective monarchy.
However, in the first centuries after Harald Fairhair, there were several periods during which the country was effectively ruled not by a king but by one of the Jarls of Lade, (Old Norse Hlaðir), from the northern part of Norway. The first such period was from about 975 to about 995 under Haakon Sigurdsson (Hákon Sigurðarson, often called 'Jarl Haakon'). Also, although Harald Fairhair's kingdom was the kernel of a unified Norway, it was still small and his power centre was in Vestfold, in the south. And when he died, the kingdom was divided between his sons. Some historians put emphasis on the actual monarchical control over the country and assert that Olav II (Olav the Stout, who later became St. Olav), who reigned from 1015, was the first king to have control over the entire country. He is generally held to be the driving force behind Norway's final conversion to Christianity and was later revered as Rex Perpetuum Norvegiæ (Latin: eternal king of Norway). Some provinces did not actually come under the rule of the Fairhair kings before the time of Harald III (Harald Hardrada, r. 1046–1066). Either of these may therefore be regarded as further unifiers of Norway. And some of the rulers were nominally or actually vassals of the King of Denmark, including Jarl Haakon.
It is undisputed that later kings, until Magnus IV (Magnus the Blind, r. 1130–1135 and 1137–1139), were descended from Harald Hardrada: the 'Hardrada dynasty'. However, many modern historians doubt whether Harald III was in fact descended from Harald Fairhair (for example questioning the identification of Halfdan in Hadafylke with the father of Sigurd Syr or Harald Fairhair's fathering of Sigurd Hrise on a Sami girl called Snæfrid) and whether he in fact made such a claim, or whether this lineage is a construction from the 12th century. Sverre Sigurdsson's claim to be the son of Sigurd Munn is also usually considered to be dubious, which would make Inge II (Inge Bårdsson) possibly the last king of a dynasty.
Scholars now consider the Fairhair dynasty at least partly the product of medieval invention. One motive would be to increase the legitimacy of rulers by giving them a clear royal ancestry dating back to the foundation of the kingdom. Another was to provide pedigrees for other people by connecting them to the royal house. Versions of the royal descent are preserved in various works by Icelandic skalds and historians, some based on now lost works: Þjóðólfr of Hvinir's Ynglingatal, in Nóregs konungatal (which preserves information from a lost work by Sæmundr fróði), and at greatest length in Snorri Sturluson's Heimskringla (which preserves information from a now lost version of Ari Þorgilsson's Íslendingabók). These differ in some respects. Joan Turville-Petre explored the relationship between them and argued that the original aims were to establish a framework of regnal years for dating and to connect Icelandic chieftains to them, and that the Vestfold origin of the dynasty was deliberately altered and they were connected to the Swedish Ynglings rather than the Skjǫldungs to fit Icelandic tradition. Claus Krag argued that an important motive was to establish a hereditary claim to Viken, the region around Oslo, because the area had been paying taxes to the King of Denmark.
Turville-Petre speaks of a "decisive reconstruction of Harald [Hardrada]'s ancestry probably carried out by Icelanders, some two hundred years after his time" which made 
Fairhair dynasty