In October 1939, Lithuania was forced to sign the Soviet–Lithuanian Mutual Assistance Treaty: five Soviet military bases with 20,000 troops were established in Lithuania in exchange for Vilnius, which the Soviets had captured from Poland. Delayed by the Winter War with Finland, the Soviets issued an ultimatum to Lithuania on 14 June 1940. They demanded the replacement of the Lithuanian government and that the Red Army be allowed into the country. The government decided that, with Soviet bases already in Lithuania, armed resistance was impossible and accepted the ultimatum. President Smetona left the country, hoping to form a government in exile, while more than 200,000 Soviet Red Army soldiers crossed the Belarus–Lithuania border. The next day, identical ultimatums were presented to Latvia and Estonia. The Baltic states were occupied. The Soviets followed semi-constitutional procedures for transforming the independent countries into soviet republics and incorporating them into the Soviet Union.