In 1940, at the beginning of World War II, British troops had invaded and occupied Iceland in fear that Germany would take the island first. In July 1941, the governments of Iceland and the US had agreed that Iceland's defense would be the responsibility of the United States. On August 8, 1941, President Roosevelt appointed MacVeagh as the first U.S. ambassador to Iceland to manage the sensitive relations between the U.S. and Iceland. He remained in Reykjavík until June 27, 1942.