The fortification lines, 16 km (9.9 mi) long, were completed on 9 July, providing a connection between Danube and Sava rivers.
Count von Hauben was sent to establish a bridgehead west of the Sava for a supply and communication route to Petrovaradin and a liaison to the troops in Zemun.
Prince Eugene was informed that the huge Ottoman army of about 140,000 men sent to relieve Belgrade was approaching under the command of Grand Vizier (Hacı) Halil Pasha.
Even when 40,000 Crimean Tatars arrived on 12 August, Halil Pasha, still reluctant to fight Eugene's army, chose to gather another war council instead of attacking.
Summoning his commanders for a council of war, he ordered a surprise attack, planned in the smallest details, for the night between 15 and 16 August.
Either I will take Belgrade or the Turks will take meAccording to the war order, the infantry under Field Marshal Charles Alexander, Duke of Württemberg would hold the center, while the imperial cavalry commanded by Hungarian Field Marshal Count János Pálffy would form at the left and right wings of the entrenchment.
In total this included 52 infantry battalions, 53 grenadier companies, and 180 cavalry squadrons, supported by 60 cannons, a force of about 60,000 soldiers.
However several Ottoman infantry battalions managed to corner the right side of Pálffy's cavalry after it lost its way in the fog this already disrupting the order of war.
General Count Claude Florimond de Mercy with the second cavalry line attacked immediately in support of Pálffy, followed by the infantry of Maximilian Adam Graf Starhemberg.
After the first hours of fighting, while the sun rose but the intense fog still covered the battlefield, the Ottomans perceived an opening in the center of the Austrian array and attacked in force.
The Ottoman 18-gun battery on the Badjina Heights was captured and the remaining troops withdrrw to the camp where the Grand Vizier ordered a full retreat.
James Oglethorpe, an aide de camp of the prince, reported that Eugene had a Te Deum performed in the tent of the Grand Vizier on 19 August after taking possession of it.
[citation needed] The entire Muslim population together with the remaining Ottoman garrison troops left unhurt taking their basic possessions with them.
Habsburg Monarchy obtained at the expense of the Ottoman Empire the Banat of Temesvár which returned to the Kingdom of Hungary, Belgrade with much of central Serbia, Lesser Wallachia (Oltenia), and some other border areas.
Belgrade would remain a territory under the domination of the Habsburg Monarchy for over twenty years until new Ottoman–Habsburg rivalries resulted in the city being reconquered by the Ottomans in 1739.