In 1918 , Iceland got many powers of its own , but the king of Denmark was still king of Iceland . The Act of Union , an agreement with Denmark signed on 1 December 1918 , valid for 25 years , recognized Iceland as a fully sovereign state in a personal union with the King of Denmark . The Government of Iceland took control of its foreign affairs and established an embassy in Copenhagen .