the Ottoman Empire had first captured Belgrade in 1521 (the first campaign of Suleyman I, the Magnificent) but lost it to Austria in 1717 (under Eugene of Savoy). The Ottomans had since then been searching for an opportunity to regain the city. After the battle of Grocka the grand vizierİvaz Mehmet Pasha laid siege to Belgrade (July 1739). In August, Hekimoğlu Ali Pasha (former grand vizier) from the western front joined him. After the siege of 51 days Count Wallis, the commander of Austrians, ordered the burning of the Danubean fleet under his command and sued for peace.
During the peace talks in Belgrade, Wilhelm Reinhard von Neipperg represented Austria and Mektupçu Ragıp (future grand vizier Koca Ragıp) ) was among the Ottoman representatives. Changing the borders caused no big problem: Austria agreed to cede territories to the Ottoman side. But the major issue was the future of Belgrade. The earliest offer of Austrians was to keep Belgrade in return for the territories ceded to Ottoman side, which the Ottoman representatives refused. The second offer of the Austrian side was to cede Belgrade on the condition that the fortifications were to be demolished. İvaz Mehmet Pasha also refused this offer. Negotiations broke down. But, Louis Sauveur Villeneuve, the French ambassador to the Ottoman Empire proposed a compromise in which only the former Ottoman fortification would be kept. Both sides agreed on the proposal and the treaty was signed on 18 September 1739.