Romania is a country located in Southeastern Europe bordering Hungary, Serbia, Ukraine, Moldova and Bulgaria. It has a long history spanning the Dacians, Roman Empire, Kingdom of Hungary and Ottoman Empire. Romania was formed in 1859 by the merging of Moldavia and Wallachia and gained independence in 1878, later joining with Transylvania, Bukovina and Bessarabia in 1918. After World War II, parts of its territory were occupied by the USSR and it became a member of the Warsaw Pact, but it has since reformed its political and economic systems and joined the European Union in 2007.