Smederevo, which had no prior settlement, was chosen for several reasons. In 1428, during the , the Hungarians and Ottomans agreed to recognize Branković as an independent ruler of Serbia, thereby turning it into a buffer state. A contract also established Ottoman overlordship of Serbia, in conjunction with remaining a Hungarian vassal. Between the longer status with Hungary and religious differences with the Ottomans (Hungary and Serbia were Christian, as compared to the Muslim Turks), it was preferred that the capital be closer to Hungary than the Ottoman Empire. Smederevo's location on the Danube, between Belgrade and Golubac, provided easy access to other points along the river. It also allowed the control of Danube traffic, including blocking Hungarian entry into the Morava valley, which satisfied the Turks.