 Areas occupied by the USSR were annexed to Soviet territory, with the exception of area of Wilno, which was transferred to Lithuania, although soon attached to USSR, when Lithuania became a Soviet republic.Under the terms of the Molotov–Ribbentrop pact, adjusted by agreement on 28 September 1939, the Soviet Union, annexed all Polish territory east of the line of the rivers Pisa, Narew, Bug and San, except for the area around Wilno (Vilnius), which was given to Lithuania, and the Suwałki region, which was annexed by Germany.These territories were largely inhabited by Ukrainians and Belarusians, with minorities of Poles and Jews (see exact numbers in Curzon line).