The unification of Norway is a romantic nationalist term referring to the process in which King Harald Halfdanson and subsequent kings merged several petty kingdoms into a single kingdom—today's Kingdom of Norway—between in AD 872 and AD 1050, during the Viking Age.
King Harald Fairhair is the monarch who is credited by later tradition as having unified Norway into one kingdom. According to the sagas, he ruled Norway from approximately 872 to 930. Modern historians assume that his rule was limited to the coastal areas of southern Norway.
In 866, Harald made the first of a series of conquests over the many petty kingdoms which would compose Norway, including Värmland in Sweden, and modern day south-eastern Norway, which had sworn allegiance to the Swedish king Erik Eymundsson. In 872, after a great victory at Hafrsfjord near Stavanger, Harald found himself king over the whole country. His realm was, however, threatened by dangers from without, as large numbers of his opponents had taken refuge, not only in Iceland, then recently discovered; but also in the Orkney Islands, Shetland Islands, Hebrides Islands, Faroe Islands and the northern European mainland. However, his opponents' leaving was not entirely voluntary. Many Norwegian chieftains who were wealthy and respected posed a threat to Harald; therefore, they were subjected to much harassment from Harald, prompting them to vacate the land. At last, Harald was forced to make an expedition to the West, to clear the islands and the Scottish mainland of some Vikings who tried to hide there.
Kings of Norway until King Olav IV, who died in 1387, claimed descent from Harald Fairhair. After Harald's death, the unity of the kingdom was not preserved, and for the next century, the kingdom was variously ruled, wholly or in part, by descendants of King Harald or by earls under the suzerainty of Denmark.
The saga descriptions 
The sagas tell us that Harald succeeded, on the death of his father Halfdan the Black Gudrödarson, to the sovereignty of several small, and somewhat scattered kingdoms in Vestfold, which had come into his father's hands through conquest and inheritance. His protector-regent was his mother's brother Guthorm.
The unification of Norway is, according to a tale, somewhat of a love story. The tale begins with a marriage proposal that resulted in rejection and scorn from Gyda, the daughter of Eirik, king of Hordaland. She said she refused to marry Harald "before he was king over all of Norway". Harald was therefore induced to take a vow not to cut nor comb his hair until he was sole king of Norway, and that ten years later, he was justified in trimming it; whereupon he exchanged the epithet "Shockhead" or "Tanglehair" for the one by which he is usually known. Most scholars today regard this story as a literary tale inspired by the Romance stories that were popular at the courts by the time Heimskringla was written.
The Norwegian kingdoms 
These maps are mainly based on later saga sources, from the 13th century. Their historical accuracy is questionable.
King Harald I's division of the kingdom ca. 930 AD. The yellow areas are petty kingdoms assigned to Harald's sons and kinsmen, the red area remained Harald's territory as High King, the purple is the domain of the earls of Lade, orange is the domain the earls of Møre.
See also