section_path: History/Federation to the World Wars
section_name: Federation to the World Wars
paragraph_text: Federation to the World Wars
  
  On 1 January 1901, federation of the colonies was achieved after a decade of planning, constitutional conventions and referendums, resulting in the establishment of the Commonwealth of Australia as a nation under the new Australian Constitution.
  
  After the 1907 Imperial Conference, Australia and several other self-governing British settler colonies were given the status of self-governing dominions within the British Empire. Australia was one of the founding members of the League of Nations in 1920, and the United Nations in 1945. The Statute of Westminster 1931 formally ended the ability of the UK to pass federal laws without Australia's consent. Australia adopted it in 1942, but it was backdated to 1939 to confirm the validity of legislation passed during World War II.
  
  The Australian Capital Territory was formed in 1911 as the location for the future federal capital of Canberra. While it was being constructed, Melbourne served as the temporary capital from 1901 to 1927. The Northern Territory was transferred from the control of South Australia to the Commonwealth in 1911. Australia became the colonial ruler of the Territory of Papua (which had initially been annexed by Queensland in 1883) in 1902 and of the Territory of New Guinea (formerly German New Guinea) in 1920. The two were unified as the Territory of Papua and New Guinea in 1949 and gained independence from Australia in 1975.
  
  In 1914, Australia joined the Allies in fighting the First World War, and took part in many of the major battles fought on the Western Front. Of about 416,000 who served, about 60,000 were killed and another 152,000 were wounded. Many Australians regard the defeat of the Australian and New Zealand Army Corps (ANZAC) at Gallipoli in 1915 as the "baptism of fire" that forged the new nation's identity. The beginning of the campaign is commemorated annually on Anzac Day, a date which rivals Australia Day as the nation's most important.
  
  From 1939 to 1945, Australia joined the Allies in fighting the Second World War. Australia's armed forces fought in the Pacific, European and Mediterranean and Middle East theatres. The shock of Britain's defeat in Singapore in 1942, followed soon after by the bombing of Darwin and other Japanese attacks on Australian soil, led to a widespread belief in Australia that a Japanese invasion was imminent, and a shift from the United Kingdom to the United States as Australia's principal ally and security partner. Since 1951, Australia has been allied with the United States under the ANZUS treaty.