Romania is situated at the intersection of Central, Eastern, and Southeastern Europe. It has land boundaries with Bulgaria in the south, Ukraine in the north, Hungary in the west, Serbia in the southwest, and Moldova in the east, as well as a Black Sea opening. It has a climate that is mostly temperate and continental. With a total area of 238,397 km2, Romania is Europe's twelfth-largest country and the European Union's sixth-most populous member state, with approximately 19.26 million people. Bucharest is the country's capital and largest city. Cluj-Napoca, Timișoara, Iași, Constanța, Craiova, Brașov, and Galaţi are some of the other major cities. The Danube River, Europe's second-longest river, rises in Germany's Black Forest and flows 2,857 kilometers southeast before emptying into Romania's Danube Delta. Moldoveanu Peak, at an elevation of 2,544 meters, is located in the Carpathian Mountains, which run from north to south through Romania. Modern Romania was established in 1859 through a personal union of the Danubian Principalities of Moldavia and Wallachia. In 1877, the new state, known as Romania since 1866, declared independence from the Ottoman Empire. Following the outbreak of World War I, Romania declared neutrality in 1914 and began fighting on the side of the Allies in 1916. Following that, the independent Kingdom of Romania annexed Bukovina, Bessarabia, Transylvania, as well as parts of Banat, Crișana, and Maramureș. Romania was forced to cede Bessarabia and Northern Bukovina to the Soviet Union, and Northern Transylvania to Hungary, as a result of the Molotov–Ribbentrop Pact and Second Vienna Award in June–August 1940. Romania signed the Tripartite Pact in November 1940 and, as a result, entered World War II on the Axis side in June 1941, battling the Soviet Union until August 1944, when it allied with the Allies and reclaimed Northern Transylvania. Romania became a socialist republic and a member of the Warsaw Pact after the war, when it was occupied by Red Army troops. Romania started its transition to democracy and a market economy after the 1989 Revolution. Romania is a developing nation with a high-income economy, ranking 49th in the Human Development Index. With an average economic growth rate of 3.5% as of 2020, it is the world's 45th largest economy by nominal GDP. Following rapid economic growth in the early 2000s, Romania now has a mostly service-based economy and is a manufacturer and net exporter of machines and electric energy, with companies such as Automobile Dacia and OMV Petrom leading the way. Since 1955, it has been a member of the United Nations, a NATO member since 2004, and a member of the European Union since 2007. The vast majority of the population is ethnically Romanian and Eastern Orthodox Christian, and speaks Romanian, a Romance language, as a first language.