Šabac is a city and municipality in western Serbia, along the Sava river, in the historic region of Mačva. It is the administrative center of the Mačva District. The city has a population of 52,822 (2011), while population of the municipality is 115,347. Šabac acquired city rights in 2007, after a partial restructuring of local government in Serbia.
The etymology of name Šabac is uncertain, although its resemblance to the name of the Sava River is suggestive. This name is in use since the end of the 15th century. In Serbian, the town is known as Šabac (Шабац), in Bosnian as Šabac, in Turkish as Böğürdelen, in German as Schabatz, and in Hungarian as Szabács.
Human settlements existed in this area in neolithic times. In the Middle Ages, Slavic settlement named Zaslon existed at the current location of Šabac. This settlement was firstly mentioned in Ragusan documents from 1454. It was part of the Serbian Despotate until it fell to the Ottoman Empire in 1459.
In 1470, the Ottomans built the first fortress in the town and named it Bejerdelen (Böğürdelen, meaning "side-striker"). In 1476 the Hungarian king Matthias captured the fort and it remained under administration of the Kingdom of Hungary till 1521, when it was again captured by the Ottoman Empire. During Hungarian administration, the town was part of the Banovina of Mačva and during Ottoman administration it was firstly part of the Sanjak of Zvornik within the Province of Bosnia, and later part of the Sanjak of Smederevo. Šabac was administrative center of the Nahija of Šabac, a local Ottoman administrative unit. In Ottoman period, Šabac was typical oriental town with tiny streets, small shops and several mosques. Population was composed of both, Muslims and Serbs.