On 10 May 1940 the UK invaded Iceland.

"Operation Fork was carried out by the Royal Navy and Royal Marines. The British government had ordered the invasions as it feared the island would be used by the Germans, who had recently overrun Denmark — Iceland's possessing country.

Marines from HMS Berwick landed at Reykjavik harbour. Having spotted the boats' approach, a small crowd had gathered.

The British consul, Gerald Shepherd, had received advance notice of the invasion and was waiting to assist the troops when they arrived. Uncomfortable with the crowd, Consul Shepherd turned to the Icelandic police, saying "Would you mind...getting the crowd to stand back a bit, so that the soldiers can get off the destroyer?" he asked. "Certainly," came the reply.

Some of the locals protested against the arrival of the British. One Icelander snatched a rifle from a marine and stuffed a cigarette in it. He then threw it back to the marine and told him to be careful with it.

The British forces began their operations in Reykjavík by posting a guard at the post office and attaching a flyer to the door. The flyer explained, in broken Icelandic, that British forces were occupying the city and asked for cooperation in dealing with local Germans.

HMS Berwick

The next priority was to capture the German consulate. On arrival there, the British troops were relieved to find no sign of resistance and simply knocked on the door. Consul Gerlach opened it, protested against the invasion, and reminded the British that Iceland was a neutral country. He was reminded, in turn, that Denmark had also been a neutral country.

On 17 May 4,000 additional troops of the Canadian Army arrived to relieve the marines. During July elements of the 2nd Canadian Division and 3rd Canadian Division were landed. Commonwealth occupation forces eventually totalled 25,000 infantrymen with elements from the Royal Air Force, Royal Navy and Royal Canadian Navy.

One year after the invasion, forces from the still officially neutral United States were stationed on the island by agreement with the Icelandic government, relieving the bulk of British ground forces. US forces grew considerably after the US joined the war on 7 December 1941, reaching as many as 30,000 army, navy and air force personnel at any one time. The RAF and RCAF continued to operate from two Royal Air Force stations through to the end of the war.

The presence of British, Canadian, and US troops had a lasting impact on the country. Foreign troop numbers in some years equalled 25 percent of the population or almost 50 percent of the native male population. Icelanders were and remain divided about the war and occupation — what is sometimes referred to as "blessað stríðið" or "the Blessed War". Some point to the subsequent economic revival, others to loss of sovereignty and social upheaval. The occupation required the building of a network of roads, hospitals, harbours, airfields and bridges across the country, and this did have enormous positive economic impact. However, the Icelanders severely censured the relationships between troops and local women, which were causing considerable controversy and political turmoil. Women were often accused of prostitution and of being traitors.

Two-hundred and fifty-five children were born from these liaisons, the ástandsbörn, 'children of the situation'. During 1941, the Icelandic Minister of the Judiciary investigated "The Situation", and the police tracked 500+ women who had been having sex with the soldiers. Many were upset that the foreign troops were "taking away" women, friends, and family.

During 1942 two facilities opened to house such women who had relations with the soldiers. Both closed within a year, after investigations determined that most liaisons were consensual. About 332 Icelandic women married foreign soldiers.

During the occupation, on 17 June 1944, Iceland declared itself a republic. The Keflavík Agreement signed during 1948 between the US and the Republic of Iceland stipulated that the American army would leave the country within six months, and Iceland would take possession of the Keflavík Airport.

This did not happen for decades, and a substantial US military presence remained in Iceland until 30 September 2006.