The fortress, with its impressive brickwork, 12 m high and 2.5 m thick, was one of the most modern[5] and largest strongholds of the Polish–Lithuanian Commonwealth, together with Kamieniec Podolski.
Further improvements were continued by the government of the Congress Poland, which in 1820 bought the city from ordynat Stanislaw Kostka Zamoyski.
Within a few days, Charles X Gustav realized that capturing Zamość, whose fortifications had been strengthened since 1648, was impossible, and on March 1, the invaders withdrew.
Next year, the Transilvanian army under George II Rákóczi appeared near Zamość, but it did not even try to capture the mighty fortress.
According to a legend, when Swedish representatives came to the town and proposed the capitulation of the fortress, Jan ‘Sobiepan’ Zamoyski answered: "I am the Lord for myself and I will not give Zamość to the Swedes".
The Great Northern War did not spare Zamość, as on February 11, 1703, Swedish units under General Magnus Stenbock approached the stronghold and besieged it.
Swedish occupation was short and in 1705, Russian soldiers, with permission of Ordynat Tomasz Jozef Zamoyski, entered Zamość.
During Napoleonic Wars, units of the Duchy of Warsaw, under Prince Jozef Poniatowski, besieged Zamość and managed to capture it.
The siege began on May 15, 1809, when units under General Ignacy Kamienski approached the fortress, whose garrison consisted of 3000 soldiers, commanded by Colonel Ferdinand von Pulszky.
[9] Joined Polish-French forces were aided by local population, also several Austrian recruits were Polish, and during the attack, these soldiers did not engage themselves in the fighting.
The main impact was directed on the Lublin Gate, which surprised the Austrians, as they had been expecting the attack on the weakest, southern wall.
After Napoleon's failed invasion on Russia (1812), the fortress was besieged by the Russian forces, which approached Zamość in February 1813.
On October 22, news of Napoleon's defeat in the Battle of Leipzig reached Zamość, and it lowered the spirits of the Poles.
The blockade of Zamość began in July 1831, and the fortress itself capitulated on November 21, as the last resistance point of the country.
Technological advance in warfare was decisive and finally, tsar Alexander II of Russia officially closed the stronghold in 1866.
In 1992, Zamość, which is one of the classical monuments of Renaissance urban layout in Europe, was included on the list of the World's Cultural Heritage by UNESCO.