The municipality called Hammerfest by og landdistrikt was established on 1 January 1838 (see formannskapsdistrikt). It included the town of Hammerfest and the vast rural district surrounding it. The law required that all towns should be separated from their rural districts, but because of low population, and very few voters, this was impossible to carry out for Hammerfest in 1838. (This was also the case in the nearby towns of Vadsø and Vardø.) In 1839, the northern district (population: 498) was separated to become the new municipality of Maasø. This left Hammerfest by og landdistrikt with 2,024 residents. On 1 January 1852, the rural district outside of the town (population: 1,256) was separated from the town of Hammerfest to form the new municipality of Hammerfest landdistrikt. This left the town with 1,125 residents. (The rural district was later divided into two municipalities with Sørøysund in the north and Kvalsund in the south.)
On 1 January 1992, the municipality of Sørøysund (population: 2,341) was merged with the town of Hammerfest (population: 6,909) to form a new, larger municipality called Hammerfest.
In 2017, the two neighboring municipalities of Hammerfest and Kvalsund voted to merge into one large municipality effective 1 January 2020. The new municipality will be named Hammerfest and it's administrative centre will be the town of Hammerfest. The new municipality will have two parallel, bilingual, interchangeable names: Hammerfest kommune (Norwegian) and Hámmerfeastta suohkan (Northern Sami).
The municipality is named after the town of Hammerfest that was established in 1789. The town was named after an old anchorage. The first element is hammer, referring to a number of large rocks, good for mooring boats, called Hamran (Old Norse: Hamarr meaning "steep mountainside"). The Hamran were covered up in land reclaiming during the early post-war years. The last element is fest, from Old Norse festr which means "fastening" (for boats).
Coat of arms
The coat of arms is from relatively recent times; they were granted on 16 December 1938. The arms of Hammerfest, a polar bear on a red background, were prepared for the celebration of the 150th anniversary of the town's foundation in 1939. The polar bear was chosen as a symbol for the fishing in the polar seas north of Norway. The polar bear itself is not native to mainland Norway. Because of its town status, the arms often have a crown above them.
The Church of Norway has one parish (sokn) within the municipality of Hammerfest. It is part of the Hammerfest prosti (deanery) in the Diocese of Nord-Hålogaland.