In June 1940 Bessarabia was occupied by the Soviet Union. Most of Bessarabia and about half of the MASSR were merged into a newly created Moldavian SSR, which became the fifteenth union republic of the USSR. A year later, in 1941, Romania attacked the Soviet Union as part of Operation Barbarossa and retook Bessarabia. Between 1941 and 1944, Romania also occupied the territory between the Dniester and Bug rivers (historic Transnistria). By 1944 the Soviets had taken back all the territories they lost in 1941, which remained in the Soviet Union on until the latter's dissolution in 1991.