from 1859 to 1877, romania evolved from a personal union of two vassal principalities (moldavia and wallachia) to a full-fledged independent kingdom. during 1918-20, at the end of world war i, transylvania, eastern moldavia (bessarabia), and bukovina were united with the kingdom of romania. in 1940, bessarabia, northern bukovina, northern transylvania and southern dobruja were ceded to the soviet union, hungary and bulgaria. in 1947 the last king was compelled to abdicate from throne. socialist republic ruled by the romanian communist party replaced the monarchy after joseph stalin occupied romania in 1945 .