 In February 1918, the Moldavian Democratic Republic declared independence and then integrated into Romania later that year following a vote of its assembly.The decision was disputed by Soviet Russia, which in 1924 established, within the Ukrainian SSR, a Moldavian autonomous republic (MASSR) on partially Moldovan-inhabited territories to the east of Bessarabia.In 1940, as a consequence of the Molotov–Ribbentrop Pact, Romania was compelled to cede Bessarabia to the Soviet Union, leading to the creation of the Moldavian Soviet Socialist Republic (Moldavian SSR), which included the greater part of Bessarabia and the westernmost strip of the former MASSR (east of the Dniester River).