 The Treaty of Warsaw of 1920 divided the disputed territories in Poland's favor along the Zbruch River.Next year, however, Ukraine lost its independence to the Soviet Union, and its remaining territories were split between Poland and the Ukrainian Soviet Socialist Republic in the Peace of Riga.Following the signing of Ribbentrop-Molotov agreement and invasion of Poland by the Soviet Union, vast territories in eastern Poland were annexed to the Ukrainian Soviet Socialist Republic.