The Ukrainian War of Independence of 1917 to 1921 produced the Free Territory of Ukraine, Ukrainian Soviet Socialist Republic (in 1919 merged from the Ukrainian People's Republic and West Ukrainian People's Republic) which was quickly subsumed in the Soviet Union. Galicia, South Bessarabia, Northern Bukovina, and Carpathian Ruthenia were added as a result of the Molotov–Ribbentrop Pact in 1939 and the Soviet victory over Germany in the Second World War, 1939–45.