It was part of Jan III Sobieski’s autumn expedition, aimed at destruction of mounted Tatar units, which plundered southeastern provinces of the Polish–Lithuanian Commonwealth.
After the Battle of Narol, Polish units rested for some time, and on 7 October set off towards Cieszanow and Lubaczow.
The area was raided by strong Crimean Tatar units, which burned villages, and captured thousands of civilians.
After destroying a smaller Tatar unit, the Poles found out that a large force under Azamet Gerej, the son of the Crimean khan, concentrated near the town of Niemirow.
Furthermore, in 1883, an obelisk was placed in Niemyrow’s market square, with the inscription that read: “Jan III Sobieski, at that time Marshall and Crown Hetman, while chasing Tatars plundering Ruthenian lands, destroyed on 7 October 1672 a large Tatar camp, freeing 12,000 szlachta and peasants, women and children.