Many Jews were involved in the struggle of Serbs for independence from the Ottoman Empire, by supplying arms to the local Serbs, and the Jewish communities faced brutal reprisal attacks from the Ottoman Turks. In 1804, when Karađorđe's forces invaded the fortress of Smederevo from the Ottomans, the Jews were expelled from Šabac and Požarevac. The independence struggle lasted until 1830, when Serbia gained its independence.