The Ukrainian SSR was established by the Bolsheviks following the defeat of the Ukrainian People's Republic in the Soviet–Ukrainian War during the Russian Civil War. As a Soviet proto-state, the Ukrainian SSR became a founding member of the United Nations along with the Byelorussian SSR, even though they were legally represented by the All-Union state in its affairs with countries outside of the Soviet Union. Upon the Soviet Union's dissolution and "perestroika", the Ukrainian SSR was transformed into the independent state of Ukraine.