The city has a population of 55,163 (2002).
The first settlement on the current location of Šabac dates from the Middle Ages, a document from 1454 records a town called Zaslon. It was part of the Slavic Serbian state until it fell to the Ottoman Empire. In 1470 the Turks built the first fortress in the town and named it Bejerdelen (trans. that which strikes from the side). The fort passed from Ottoman to Austrian rule several times as it was on a fairly important geostrategic position. The border town was also a prominent place for commerce.
The etymology of the newer and present name, Šabac, is uncertain, but it's probably a morphing of the word Sava. Šabac became a site of importance in Serbian history in the First Serbian Uprising. In 1806, Karađorđe Petrović led the Serbian insurgents into one of the first victories over the Turkish army near the village of Mišar near the city of Šabac. The Obrenović family also left a mark on the city as the place of residence of the enlightened Jevrem Obrenović, brother of Prince Miloš Obrenović, who modernized and urbanized the city after the Second Serbian Uprising. During this time (1820s-1840s), the first hospital, pharmacy, Serbian grammar school, gymnasium, theatre and musical society were established in Šabac.
The city was liberated from the Ottomans in 1867. The first newspaper was printed in Šabac in 1883, and the city was also the first place in Serbia where women started visiting coffeeshops (on Sunday afternoons, as it was customary for men at the time). The city prospered until the First World War when it was severely destroyed and had its population halved (from ca. 14,000 to 7,000). The WWI is also remembered for the battle on the 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.
The Yugoslav period was marked by renewed progress. The chemical factory "Zorka" was opened in Šabac in 1938 and marked the city development. However, this was interrupted by World War II and the occupation by Nazi Germany. During this time, some 5,000 citizens of Šabac and 20,000 more people were imprisoned in the Šabac concentration camp, eventually causing the death of around 7,000 people. The city was finally liberated by the Partisans in 1944.
After WWII, Šabac grew into a modern industrial city with the aforementioned chemical plant "Zorka". It achieved particular growth in the 1970s when the first modern sports hall, hotel, stadium, as well as a number of schools, kindergartens and other institutions were built to accommodate for the population growth. Notably, the swamp Benska bara at the city outskirts was drained and turned into a residential neighbourhood, and a new concrete bridge over Sava was built that connected it with the surroundings better. The city and the periphery number around 75,000 residents today, making it one of the larger cities in Serbia.