Romania (/roʊˈmeɪniə/ roh-MAY-nee-ə; Romanian: România [romɨˈni.a]) is a unitary semi-presidential republic located in Southeastern Europe, bordering the Black Sea, between Bulgaria and Ukraine. It also borders Hungary, Serbia, and Moldova. It covers 238,391 square kilometres (92,043 sq mi) and has a temperate-continental climate. With its 19.94 million inhabitants, it is the seventh most populous member state of the European Union. Its capital and largest city, Bucharest, is the sixth largest city in the EU. The River Danube, which is Europe's second longest river after the Volga, rises in Germany and flows southeastwards for a distance of 2,857 km, coursing through ten countries before emptying in Romania's Danube Delta. Some of its 1,075 km length bordering the country drains the whole of it. The Carpathian Mountains (the tallest peak is Moldoveanu at 2,544 m, 8346 ft) cross Romania from the north to the southwest.Modern Romania emerged within the territories of the ancient Roman province of Dacia, and was formed in 1859 through a personal union of the Danubian Principalities of Moldavia and Wallachia. The new state, officially named Romania since 1866, gained independence from the Ottoman Empire in 1877. At the end of World War I, Transylvania, Bukovina and Bessarabia united with the sovereign Kingdom of Romania. During World War II, Romania was an ally of Nazi Germany against the Soviet Union, fighting side by side with the Wehrmacht until 1944, then it joined the Allied powers after being occupied by the Red Army forces. After the war, Romania became a socialist republic and member of the Warsaw Pact. After the 1989 Revolution, Romania began a transition back towards democracy and a capitalist market economy.Following rapid economic growth in the 2000s, Romania has an economy predominantly based on services, and is a producer and net exporter of machines and electric energy, featuring companies like Automobile Dacia and OMV Petrom. It has been a member of NATO since 2004, and part of the European Union since 2007. Around 90% of the population identify themselves as Eastern Orthodox Christians, and are native speakers of Romanian, a Romance language. With a rich cultural history, Romania has been the home of influential artists, musicians, inventors and sportspeople, and features a variety of tourist attractions.