Born into an impoverished family in the Šumadija region of Ottoman Serbia, Karađorđe distinguished himself during the Austro-Turkish War of 1788–1791 as a member of the Serbian Free Corps, a militia of Habsburg and Ottoman Serbs, armed and trained by the Austrians. Fearing retribution following the Austrians' and Serb rebels' defeat in 1791, he and his family fled to the Austrian Empire, where they lived until 1794, when a general amnesty was declared. Karađorđe subsequently returned to Šumadija and became a livestock merchant. In 1796, the rogue governor of the Sanjak of Vidin, Osman Pazvantoğlu, invaded the Pashalik of Belgrade, and Karađorđe fought alongside the Ottomans to quash the incursion.