then appointed Bethlen prime minister. Charles IV died soon after he failed a second time to reclaim the throne in October 1921. (For more detail on Charles's attempts to retake the throne, see Charles IV of Hungary's conflict with Miklós Horthy.) As prime minister, Bethlen dominated Hungarian politics between 1921 and 1931. He fashioned a political machine by amending the electoral law, providing jobs in the expanding bureaucracy to his supporters, and manipulating elections in rural areas. Bethlen restored order to the country by giving the radical counterrevolutionaries payoffs and government jobs in exchange for ceasing their campaign of terror against Jews and leftists. In 1921, he made a deal with the Social Democrats and trade unions (called Bethlen-Peyer Pact), agreeing, among other things, to legalize their activities and free political prisoners in return for their pledge to refrain from spreading anti-Hungarian propaganda, calling political strikes, and organizing the peasantry. Bethlen brought Hungary into the League of Nations in 1922 and out of international isolation by signing a treaty of friendship with Italy in 1927. The revision of the Treaty of Trianon rose to the top of Hungary's political agenda and the strategy employed by Bethlen consisted by strengthening the economy and building relations with stronger nations. Revision of the treaty had such a broad backing in Hungary that Bethlen used it, at least in part, to deflect criticism of his economic, social, and political policies. The Great Depression induced a drop in the standard of living and the political mood of the country shifted further toward the right. In 1932 Horthy appointed a new prime-minister, Gyula Gömbös, who changed the course of Hungarian policy towards closer cooperation with Germany. Gömbös signed a trade agreement with Germany that drew Hungary's economy out of depression but made Hungary dependent on the German economy for both raw materials and markets. On 2 November 1938, as the result of the First Vienna Award parts of Czechoslovakia – Southern Slovakia and a part of Carpathian Ruthenia – were returned to Hungary, an area amounting to 11,927 km2 and a population of 869,299 (86.5% of which were Hungarians according to the 1941 census). Between 5 November and 10 November, Hungarian armed forces peacefully occupied the newly transferred territories. Hitler later promised to transfer all of Slovakia to Hungary in exchange for a military alliance, but his offer was rejected. Instead, Horthy chose to pursue a