In September 1939, Australia joined Great Britain in declaring war on Germany and immediately passed legislation to enable the internment of Australian civilians who might represent a threat to national security. In June 1940, the Australian Government agreed to also accommodate Britain's civilian internees as well as the thousands of civilians detained by the allies in Palestine, Persia, South Africa, Singapore, and other parts of South East Asia and the Pacific. Seven camps were set up near Tatura, four held civilian internees including families, while the other three accommodated prisoners of war. The camps closed progressively from 1945 to 1947 and many of the internees and some prisoners of war settled in Australia after their release.