The first New Zealand foreign minister was James Allen, appointed to the post of "Minister of External Affairs" by William Massey in 1919. Before this time, there was no dedicated ministerial portfolio for foreign relations. A Department of External Affairs was created in 1919 but its functions were limited to administering New Zealand's Island Territories in the Pacific; namely the Cook Islands, Niue, Tokelau, and the League of Nations Mandate of Samoa. In 1943, a new Department of External Affairs was created to conduct the country's external relations. The older department was then renamed the Department of Island Territories and a separate portfolio called the Minister of Island Territories was subsequently created.