After the signing of the Molotov–Ribbentrop non-aggression pact on 23 August 1939, the Wehrmacht invasion of Poland began on 1 September 1939. After the Soviet-Japanese ceasefire agreement took effect on 16 September, Stalin ordered his own invasion of Poland on 17 September. This triggered Latvia and the USSR to sign a treaty in Moscow on 6 October 1939, to protect the USSR's south western border. This allowed the Soviets to invade part of south-eastern region of Finland (Karelia and Salla) in the Winter War, which after 105 days were annexed.