The Principality of Romania appeared in 1859 after the unification of the principalities of Wallachia and Moldavia. However, these countries were founded in the 14th century, and their borders changed repeatedly throughout history. Wallachia, which had obtained Dobruja during the reign of Mircea the Elder, lost the territory to the Ottomans at the end of it (around 1418). In the same period, the Ottomans annexed two ports north of the Danube, Giurgiu and Turnu Măgurele. In the middle of the 16th century, Wallachia also lost the city of Brăila. During the year 1600, Michael the Brave, ruler of Wallachia, unified the three Romanian principalities (Wallachia, Moldavia and Transylvania), although this union would be dismembered shortly after. The Austro-Turkish War that ended in 1718 was won by the Austrian Habsburg Monarchy, which, among other lands, annexed Oltenia (the western part of Wallachia). However, the Treaty of Belgrade of 1739 again yielded Oltenia to Wallachia. In 1826, as a result of the Akkerman Convention, Wallachia reclaimed the three ports north of the Danube, drawing the Ottoman-Wallachian border across the Danube again.