In March 1939, Germany took over Czechoslovakia, just six months after signing the Munich Agreement, which sought to appease Hitler by ceding the mainly ethnic German Czechoslovak borderlands; while most of Europe had celebrated the agreement as a major victory for peace, the open flaunting of its terms demonstrated the failure of appeasement. Britain and France, which had been the main advocates of appeasement, decided that Hitler had no intention to uphold diplomatic agreements and responded by preparing for war. On 31 March 1939, Britain formed the Anglo-Polish military alliance in an effort to avert an imminent German attack on Poland; the French likewise had a long-standing alliance with Poland since 1921. The Soviet Union, which had been diplomatically and economically isolated by much of the world, had sought an alliance with the western powers, but Hitler preempted a potential war with Stalin by signing the Nazi–Soviet non-aggression pact in August 1939. In addition to preventing a two-front war that had battered its forces in the last world war, the agreement secretly divided the independent states of Central and Eastern Europe between the two powers and assured adequate oil supplies for the German war machine.