This treaty ended the hostilities of the five-year Austro-Russian–Turkish War (1735–39), in which the Habsburgs joined Imperial Russia in its fight against the Ottomans. With the Treaty of Belgrade, the Habsburgs ceded the Kingdom of Serbia with Belgrade, the southern part of the Banat of Temeswar and northern Bosnia to the Ottomans, and Oltenia, gained by the Treaty of Passarowitz in 1718, to Wallachia (an Ottoman subject), and set the demarcation line to the rivers Sava and Danube. The Habsburg withdrawal forced Russia to accept peace at the Russo-Turkish War, 1735-1739 with the Treaty of Niš, whereby it was allowed to build a port at Azov, gaining a foothold on the Black Sea.[1]