The battle, part of the first Austro-Hungarian invasion of Serbia, began on the night of 15 August when elements of the Serbian 1st Combined Division encountered Austro-Hungarian outposts that had been established on the slopes of Cer Mountain earlier in the invasion. The clashes that followed escalated into a battle for control over several towns and villages near the mountain, especially Šabac. On 19 August, the morale of the Austro-Hungarians collapsed and thousands of soldiers retreated back into Austria-Hungary, many of them drowning in the Drina River as they fled in panic. On 24 August the Serbs re-entered Šabac, marking the end of the battle.