Hversu Noregr byggðist (Old Norse: How Norway was built) 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'.
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.