The Fairhair dynasty (Norwegian: Hårfagreætta) was a family of kings founded by Harald I of Norway which united and ruled Norway with few interruptions from the latter half of the 9th century to 1387 (traditional view), or through only three generations of kings ending with Harald Greycloak in the late 10th century (the view of many modern scholars).
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.