Hversu Noregr byggðist (Norse, Old: How Norway was inhabited) is an account of the origin of various legendary Norwegian lineages, which survives only in the Flateyjarbók. It traces the descendants of the primeval Fornjót, a king of "Gotland, Kænland and Finnland", down to Nór, who is here the eponym and first great king of Norway, and then gives details of the descendants of Nór (and of his brother Gór) in a following section known as the Ættartölur, 'Genealogies'.
The Hversu account is closely paralleled by the opening of the Orkneyinga saga, which gives a slightly different version of the story and provides details on the descendants of Gór only, including information not found in the Hversu or Ættartölur. This opening portion of Orkneyingers saga is also known as Fundinn Noregr, 'Founding of Norway'.
Much of the material in these two accounts is found nowhere else, especially the tracing of many noble families to the stock of giants rather than to the god Odin which is the tendency elsewhere.
The genealogies also claim that many heroic families famed in Scandinavian tradition but not located in Norway were in fact of Norwegian stock, mostly sprung from Nór's great-grandson Halfdan the Old. Almost all the lineages sprung from Halfdan are then shown to reconverge in the person of Harald Fairhair the first king of all Norway. Where the information here is comparable with accounts in other sources, it is sometimes confirmed and sometimes contradicted, as would be expected. There are also minor discrepancies and contradictions within the Ættartölur. Included also is material on the Danish Skjöldung lineage and the Yngling lineage as ancestors of Harald Fairhair, including the purported line of descent from Adam to Harald.
The Ættartölur end with a genealogy of Harald's royal descendants down to Olaf IV of Norway with the statement the account was written in 1387, a list of the kings of Norway from this Olaf back to Harald Fair-hair, and a mention of the accession of Margaret, Olaf's mother, as direct ruler of Norway.