During the War of 1812, several battles took place near Bauska, the largest of which was the Battle of Ekau. On July 17, the Commander of the Russian Empire's troops in Bauska, Lieutenant Colonel Kunicki of the Polish Uhlans Regiment, learned of an approaching Prussian intelligence unit, confronted it and launched a battle four versts, or about , from Bauska, but was defeated and forced to retreat in the direction of Iecava (). On July 18, Bauska was captured by the 27th Prussian Division of General Julius von Grawert of the Napoleonic Army Marshal Jacques MacDonald's Prussian Corps on their way toward Riga.