The town prospered until the First World War, when it was occupied and devastated by the Austro-Hungarian army and had its population halved (from cca. 14,000 to 7,000) on the orders of Kasimir von Lütgendorf, despite the fact that the Royal Serbian Army evacuated the town without resistance. Lütgendorf later ordered three of his own soldiers to be publicly executed by bayonet in the town square for drunkenly discharging their rifles despite orders from his superior Karl Tersztyánszky von Nádas to stop, leading to him being court-martialed and convicted for murder after the war in 1920. World War I is also remembered for the battle on nearby Cer mountain where the Serbian army under general Stepa Stepanović won an early victory against Austria-Hungary in August 1914, the first Allied victory in the war. After the war, Šabac was decorated with the French War Cross with Palm (1920), the Czechoslovak War Cross (1925), and the Order of the Karađorđe's Star with Swords (1934).