After the dissolution of the Livonian Order in 1561, Ludza was incorporated to the Polish–Lithuanian Commonwealth and became part of Wenden Voivodeship. In January 1626, during the Polish-Swedish War, Ludza was captured without a battle by Sweden due to defeat of the forces of Polish-Lithuanian marshal Jan Stanisław Sapieha. Later it was recaptured by Polish forces.