In 1916 the city was provided with the railway line. After Poland regained its independence in 1918, Zamość witnessed the outbreak of a communist revolt, suppressed by the Polish troops under the command of Major Leopold Lis-Kula. Two years later, during the Polish-Soviet War, the Soviet army surrounded the city but failed to capture it.
