Turkey was neutral until several months before the end of the war, at which point it joined the Allied powers. Prior to the outbreak of war, Turkey signed a Mutual Aid Pact with France and Britain in 1939. After the German invasion of France, however, Turkey remained neutral, relying on a clause excusing them if military action might bring conflict with the USSR, which, after the division of Poland, Turkey feared, as East Thrace including Istanbul and the Caucasian borderlands were especially vulnerable to a potential Soviet attack. Then, in June 1941, after neighboring Bulgaria joined the Axis and allowed Germany to move troops through to invade Yugoslavia and Greece, Turkey signed a treaty of friendship with Germany.