In 1699, the city was given back to Poland under King Augustus II the Strong according to the Treaty of Karlowitz.
În 1699, orașul a fost retrocedat Poloniei conduse de regele August al II-lea prin tratatul de la Karlowitz.