Following the defeat of the Turks near Vienna in 1683, their expulsion and the liberation of cities continued: Buda in 1686, Szeged in 1687, Belgrade in 1688, all the way to Niš, Priština, Peć, Prizren, and Skopje.
In the Battle of Kačanik in 1690, the Austrian army was defeated, and in their retreat, they abandoned all regions up to Niš. The Turks mercilessly punished the Christian population in the areas from which the Austrian army withdrew, accusing them of faithlessness during the Turkish retreat from these regions. News of Turkish cruelty quickly spread throughout Serbia, prompting people to flee northward. Serbs fled towards Belgrade and the Sava River, as the Turks held Temišvar and its surroundings, posing a threat to the entire left bank of the Danube in Banat.