Hammerfest is a city and municipality in Finnmark county, Norway. The municipality encompasses parts of three islands: Kvaløya, Sørøya, and Seiland. Hammerfest was established as a municipality on 1 January 1838 (see formannskapsdistrikt). The law required that all cities 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. (See also Vadsø and Vardø.) The rural district of Hammerfest (Sørøysund) was separated from the city on 1 January 1852, but it was merged back into the city on 1 January 1992 (but without the area of Kvalsund, which was separated from Sørøysund as a municipality of its own in 1869).