After their victory in the Norwegian Campaign of the Second World War, the Germans soon fortified Hammerfest and used it as a major base. The importance of Hammerfest to the Germans increased dramatically after their invasion of the Soviet Union in 1941. The occupiers installed three coastal batteries in and around Hammerfest, one with four guns on Melkøya island near the town, one with three 10.5 cm guns on a hill right outside the town and a final battery with casemated pieces on the Rypklubben peninsula near Rypefjord.