Although most scholars currently tend to regard the unification as a process lasting centuries, rather than being the result of a single battle, the Battle of Hafrsfjord ranks high in the popular imagination of Norway. It was the conclusion of King Harald I of Norway's declaration to become the sole ruler of Norway. This battle may well have been the largest in Norway up to that time and for a substantial time afterward.
It was formerly believed that this battle was the decisive event in the unification of Norway. According to Snorri's saga, King Harald controlled large parts of Norway's southeast portion before the battle; but other sources claim that the eastern portion of Norway was under the Danish king. The Battle of Hafrsfjord marks the final crushing of opposition from Norway's southwestern portion (primarily Rogaland, but also chieftains from the Sognefjord area). This made it possible for King Harald to subdue the country and collect taxes from a large part of it. Later historiography regarded him as the first legitimate King of Norway. Many of the defeated who would not submit to Harald's rule emigrated to Iceland (q.v.). 
The exact year of the battle is unknown, but is generally considered to have taken place between 870 and 900. This uncertainty is due to lack of sources, and partly because the Christian calendar was not introduced at the time. The sagas follow the convention of counting the number of winters passed since an event.
A traditional date of the event, the year 872, is a 19th-century estimate. In the 1830s, the historian Rudolf Keyser counted the number of years backwards from the Battle of Svolder as recorded in Snorri Sturluson's Heimskringla, dating the battle to 872. Keyser's chronology was popularized by the works of the historian P. A. Munch, and by that time still unchallenged, this year was chosen for the millennial celebration of the unification of the Norwegian state in 1872. 
In the 1920s, using similar methods as Keyser but highly critical to the reliability of the sagas, the historian Halvdan Koht dated the battle to about 900. For the next fifty years, this chronology was regarded by most scholars as being most likely. In the 1970s, the Icelandic historian Ólafia Einarsdóttir concluded that the battle took place somewhere between 870 and 875. However still disputed, most scholars will agree that the battle took place during the 880s. 
The national monument of Haraldshaugen was raised in 1872 to commemorate the Battle of Hafrsfjord. In 1983, the monument and landmark The Swords in the Rock (Sverd i fjell) was designed by Fritz Røed and raised at Hafrsfjord in memory of the battle.
The only contemporary source to this event is from Haraldskvæthi or Hrafnsmól (Lay of Harold), a ballad written by Þorbjörn Hornklofi (Modern Norwegian: Torbjørn Hornklove), the court poet of King Harald Fairhair. The ballad is very simple, dramatic and illustrative.