In 1929, Lyons resigned from state parliament to enter federal politics, winning a House of Representatives seat in Labor's landslide victory at the 1929 election. He was immediately appointed to cabinet by the new prime minister James Scullin, becoming Postmaster-General and Minister for Works and Railways. In 1930, he served as acting treasurer while Scullin was overseas, and came into conflict with the Labor caucus over the government's response to the Great Depression; he preferred orthodox financial policies. In early 1931, Lyons and his followers left Labor to sit as independents. His exact motivations for leaving the party have been subject to debate. A few months later his group merged with other opposition parties to form the United Australia Party; he was elected Leader of the Opposition.