Construction of the Ofoten Line started in 1898 along with the Ore Line from Riksgränsen to Kiruna. They were completed in 1902, allowing LKAB to haul ore from their mines in Kiruna to the ice-free Port of Narvik. Operation and ownership of the line was held by the Norwegian State Railways. The line was electrified in 1915 and Norwegian State Railways (NSB) started using El 3 and El 4 locomotives. During World War II, the ore traffic stopped because of the Battles of Narvik and the bombing of the town. In the following decades, NSB introduced El 12 and El 15 locomotives. In 1996, operation of the ore trains was taken over by Malmtrafik, which was controlled by and now is a subsidiary of the mining company LKAB. The same year, ownership of the railway line was transferred to the newly created Norwegian National Rail Administration. The line has been upgraded to axle loads, allowing the new Iore locomotives to haul trains.