Following the 1814 Treaty of Kiel that ended the dual Denmark–Norway kingdom, the Faroe Islands remained under the administration of Denmark as a county. During World War II, after Denmark was occupied by Nazi Germany, the British invaded and occupied the Faroe Islands until shortly after the end of the war. Following an independence referendum in 1946 that took place unrecognized by Denmark, the Faroe Islands were in 1948 granted extended self-governance with the Danish Realm with the signing of the "Home Rule Act of the Faroe Islands".