Narvik began as a bronze age settlement. In the 1870s the Swedish government began to understand the potential of the iron ore mines in Kiruna, Sweden. Port facilities were Kiruna’s one major challenge. Luleå, the closest port, was: covered with ice all winter, far from the mine, suitable for only medium-sized bulk freighters. Narvik was developed as an all-year ice free port for the Swedish iron ore mines at Kiruna and Gällivare. Gällivarre Aktiebolag, a Swedish company, built the 298 km iron ore railway line (Malmbanan) in Sweden to the Norwegian–Swedish border. The 43 km Norwegian Ofotbanen railway line connects Narvik to the border.
On 1940-04-08, Britain attempted to lay anti-shipping minefields around Narvik in Norwegian territorial waters. On 1940-04-09 Germany invaded Norway. The Battles of Narvik were fought from 1940-04-09 to 1940-06-08, as two naval battle in Ofotfjord and a land battle in the surrounding mountains. Although the Germans were defeated at sea, lost control of Narvik and were pushed back towards the Swedish border, they eventually prevailed because of the Allied evacuation from Norway in 1940-06.
Since then, Narvik has called itself the city of peace.