Following the defeat of Ukrainian People's Republic (1918) in the Ukrainian–Soviet War of 1921, Western Ukraine was partitioned by the Treaty of Riga between Poland, Czechoslovakia, Hungary, and the Soviet Russia acting on behalf of the Soviet Belarus and the Ukrainian Soviet Socialist Republic with capital in Kharkiv. The Soviet Union gained control over the entire territory of the short-lived Ukrainian People's Republic east of the border with Poland. In the Interbellum most of the territory of today's Western Ukraine belonged to the Second Polish Republic. Territories such as Bukovina and Carpatho-Ukraine belonged to Romania and Czechoslovakia, respectively.