Spender entered politics at the 1937 election when he was elected to the House of Representatives as member for Warringah. He ran as an "independent UAP" candidate, unexpectedly defeating the sitting member, Sir Archdale Parkhill. On 20 October 1938, Spender announced that he would join the UAP, but that he would "continue to stand for independent expression of thought and action and against the principle of preselection of candidates".
became prime minister in April 1939 and appointed himself as Treasurer, as was common at the time. Spender was promoted to cabinet as a minister without portfolio, but effectively ran the Department of the Treasury in Menzies' stead. He was initially given the title "Minister without portfolio assisting the Treasurer", and then in November 1939 was named Acting Treasurer. He was a member of two subcommittees within cabinet – the Economic Cabinet and War Cabinet – and in January 1940 was additionally made Vice-President of the Executive Council. Spender was officially appointed Treasurer a few months later, in March 1940. He would later recall in his memoirs that he had been "in full charge of Treasury throughout". Spender's primary objective as Treasurer was to accelerate the country's transition to a war economy. Australian troops were already fighting in Europe and the Middle East, and although the Pacific War would not begin until December 1941 it was believed by many that the appeasement of Japan had failed and fighting closer to home was inevitable. Spender was concerned that permanent officials at Treasury, including departmental secretary Stuart McFarlane, were not taking the situation seriously enough. He began to rely more on the advice of temporary staff and independent economists like Lyndhurst Giblin. According to political historian John Hawkins, Spender was "the most academically qualified economist among pre-WWII treasurers". He promoted interventionist Keynesian policies, such as borrowing money and raising taxes to spend on defence-related projects and thereby reduce unemployment. He also wished to control private investing so that capital would be available to the government for defence purposes, introducing requirements for private banks to place a set proportion of deposits with the Commonwealth Bank.
Later activities
After the 1940 federal election, Arthur Fadden was elected leader of the Country Party, the UAP's coalition partner, and demanded the position of Treasurer. Spender was instead made Minister for the Army, which he would hold until the government's defeat on a confidence motion in October 1941. Anticipating Japan's entry into the war, he pressed for Australian troops to be moved from the Middle Eastern theatre closer to home. He "invited Australian generals to communicate directly with him and challenged British reassurances about the defences of Singapore". Menzies resigned as UAP leader in October 1941, and Spender was an unsuccessful candidate for the leadership. He was eliminated on the first ballot, with Billy Hughes subsequently defeating Allan McDonald by a narrow margin. Spender was also a candidate for the UAP leadership in 1943, when Hughes resigned. He was again eliminated on the first ballot, polling only a handful of votes. In February 1944, the UAP voted to withdraw its members from the Advisory War Council. Spender refused to resign from the council, and was expelled from the UAP as a result on 23 February 1944. The party reportedly voted 21 to 5 in favour of an expulsion motion moved by Robert Menzies – who had been largely responsible for the creation of the council as a nonpartisan body. John Curtin subsequently sent Spender a letter thanking him for staying on. Billy Hughes was expelled in similar circumstances two months later. Spender sat as an independent after being expelled from the UAP. He was approached to join the Liberal Democratic Party, a small UAP breakaway, but declined. In May 1945, Spender became a financial member of the Mosman branch of the Liberal Party of Australia. However, he was not admitted to the parliamentary Liberal Party until 13 September 1945, when the Advisory War Council was abolished. Hughes was also re-admitted at that point.
Post-war politics
Upon Menzies' return to power in 1949, Spender was made Minister for External Affairs and Minister for External Territories. Spender's greatest influence on Australian politics occurred during this period. He led Australian delegations to the British Commonwealth Conference in Colombo, Ceylon and to the Fifth Session of the United Nations General Assembly. At the conference in Colombo, Spender was instrumental in the development of the Colombo Plan. He also played a large part in the signing of the ANZUS Pact and the Treaty of San Francisco. Spender expressed more desire to secure alliances with 'great powers' than contribute to collective security, stating that international organisations like the UN may "contain those who are at work to disrupt the order we believe in". In this sense Spender was more akin to the realist tradition of Australian foreign politics linked to former Prime Minister Sir Robert Menzies.
Diplomatic and judicial posts
On leaving politics, Spender was appointed Australia's Ambassador to the United States. He was the first Australian appointed to the International Court of Justice in The Hague and was the Court's President 1964–67. Spender died in May 1985, aged 87.
Marriages and family
Spender married Jean Maud Henderson on 6 April 1925 at St Mary Magdalene Church of England, Coraki, New South Wales. She became a crime-fiction writer and they had two sons. One son, John Spender, was also a politician and diplomat. Jean Spender died in 1970 and on 4 October 1975 at St Mark's Church of England, Darling Point, he married Averil Watkins Trenerry, née McLeod. The marriage was short-lived and they divorced soon after. He married Eileen Esdaile, née Congreve, in Honolulu, Hawaii in 1983. He was the last surviving member of the Menzies and Fadden Cabinets.