The treaty, signed by the Polish–Lithuanian Commonwealth and the Ottoman Empire, ended the second phase of the Polish–Ottoman War (1672–76). It revised the 1672 Treaty of Buchach, and was more favorable to the Commonwealth, which no longer had to pay tribute, and regained about one third of the Ukrainian territories lost in the Buchach treaty. It also stipulated that the Lipka Tatars were to be given a free individual choice of whether they wanted to serve the Ottoman Empire or the Polish-Lithuanian Commonwealth.