Treaty of Karlowitz
The Commonwealth did regain the territories lost in this war after the Polish–Ottoman War (1683–1699) in 1699 Treaty of Karlowitz, but that was one of the last of its victories.