Bulgaria, bordering Greece, Turkey, Macedonia, Serbia and Romania, sits on the southeastern end of the Balkan Peninsula. Its northern border generally follows the Danube River as it makes its final descent to the Black Sea, and the Rhodope Mountains shape its southern border. The Balkan Mountains dominate Bulgaria's interior, dividing the country in two as they traverse from west to east. The highly fertile Danubian Plain lies north of the Balkans, while the Thracian Plain lies to its south. In ancient times, the Thracians, Greeks, Persians and Romans settled in what is now Bulgaria. The First Bulgarian Empire emerged in 681 AD, to be followed by the Second Bulgarian Empire in the 12th century. After the fall of this second empire in the late 14th century, Bulgaria came under Ottoman dominance for the next five centuries. Bulgaria regained independence in the 1870s with help from Russia, creating created close ties between the two nations. However, conflict marked the decades that followed independence, including two Balkan wars and World Wars I and II. After the Second World War, Bulgaria became a communist state within the Soviet orbit. With the end of the Cold War, Bulgaria joined NATO in 2004 and the European Union in 2007, moves accompanied by economic and institutional modernization and the arrival of foreign direct investment. But significant waves of emigration from the country also followed; Bulgaria’s population, which was about 9 million in 1986, had dropped to 7 million by 2016. While the Bulgarian economy has grown significantly since its communist days, it remains the poorest member of the European Union in terms of gross domestic product per capita. Bulgaria has strong trade ties with both the European Union and Turkey, and Russian natural gas accounts for a significant part of its domestic supply. Bulgaria’s main challenge is to balance the bigger powers around it in a region where external threats have been frequent.