The region was occupied by the Soviet Union in 1940 following the signing of the Molotov–Ribbentrop Pact with Nazi Germany, and was added to the Ukrainian Soviet Socialist Republic. It was recaptured by Romania in 1941 in the course of Axis attack on the Soviet Union in the Second World War, but was recaptured again by the Soviet Army in 1944. The annexation was confirmed by the Paris Peace Treaties in 1947 between the USSR and the Communist Romania.