The Act of Union, an agreement with Denmark signed on 1 December 1918, valid for 25 years, recognised Iceland as a fully sovereign state in a personal union with the King of Denmark. Iceland's status became comparable with that of countries that belong to the Commonwealth Realms—members of the Commonwealth of Nations whose sovereign is the Queen of the United Kingdom of Great Britain and Northern Ireland. The Government of Iceland took control of its foreign affairs and established an embassy in Copenhagen. However, it requested that Denmark implement Icelandic foreign policy toward countries other than Denmark. Danish embassies around the world then displayed two coats of arms and two flags: those of the Kingdom of Denmark and Kingdom of Iceland.

During World War II, Iceland joined Denmark in asserting neutrality. After the German occupation of Denmark on 9 April 1940, Althingi (Parliament) declared that the Icelandic Government should assume the Danish king's duties and take over implementation of foreign affairs and other matters previously handled by Denmark at Iceland's request. A month later, British Armed Forces occupied Iceland, violating Icelandic neutrality. In 1941, the occupation of Iceland was taken over by the United States so that Britain could use its troops elsewhere.

On 31 December 1943, the Act of Union Agreement expired after 25 years. Beginning on 20 May 1944, Icelanders voted in a four-day plebiscite on whether to terminate the personal union with the King of Denmark and establish a republic.[24] The vote was 97% in favour of ending the union and 95% in favour of the new republican constitution. Iceland formally became a republic on 17 June 1944, with Sveinn Björnsson as the first President.