Romania ro-MAY-nee-ə; Romanian: România [romɨˈni.a] ) is a country located at the crossroads of Central, Eastern, and Southeastern Europe. It shares land borders with Bulgaria to the south, Ukraine to the north, Hungary to the west, Serbia to the southwest, and Moldova to the east and has its opening to the Black Sea. It has a predominantly temperate-continental climate. With a total area of 238,397 square kilometres , Romania is the twelfth-largest country in Europe and the seventh-most populous member state of the European Union, having approximately 20 million inhabitants. Its capital and largest city is Bucharest. Other major urban areas include: Cluj-Napoca, Timișoara, Iași, Constanța, Craiova, Brașov, and Galați. The River Danube, Europe's second-longest river, rises in Germany's Black Forest and flows in a generally southeasterly direction for 2,857 km , coursing through ten countries before emptying into Romania's Danube Delta. The Carpathian Mountains, which cross Romania from the north to the southwest, include Moldoveanu Peak, at an altitude of 2,544 m .Modern Romania 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. Following the outbreak of World War I, after declaring its neutrality in 1914, Romania fought on the side of the Allied Powers beginning in 1916. Afterwards Bukovina, Bessarabia, Transylvania as well as parts of Banat, Crișana, and Maramureș became part of the sovereign Kingdom of Romania. In June–August 1940, as a consequence of the Molotov–Ribbentrop Pact and Second Vienna Award, Romania was compelled to cede Bessarabia and Northern Bukovina to the Soviet Union, and Northern Transylvania to Hungary. In November 1940, Romania signed the Tripartite Pact and, consequently, in June 1941 entered World War II on the Axis side, fighting against the Soviet Union until August 1944, when it joined the Allies and recovered Northern Transylvania. Following the war, under the occupation of the Red Army's forces, Romania became a socialist republic and a member of the Warsaw Pact. After the 1989 Revolution, Romania began a transition towards democracy and a market economy. Romania ranks 52nd in the Human Development Index, and is a developing country with a high-income economy. It has the world's 62nd largest economy by nominal GDP, with an annual economic growth rate of 3.5% as of 2020. Following rapid economic growth in the early 2000s, Romania has an economy based predominantly 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 the United Nations since 1955, part of NATO since 2004, and part of the European Union since 2007. An overwhelming majority of the population identifies as ethnic Romanian and Eastern Orthodox Christian and are native speakers of Romanian, a Romance language.