In 1793, Hadji Mustafa Pasha was appointed governor of the Pashalik of Belgrade. He declared a general amnesty for former rebels and announced that Muslims would no longer serve as tax-collectors in areas where Christians formed a majority of the population. These changes were part of a plan devised by Sultan Selim aimed at improving relations with the Pashalik's Christian population. Sensing that it was safe, Petrović returned to Šumadija in 1794, together with his family. He settled in Topola, where he became a livestock merchant and traded with the Austrians. His business dealings led him to establish connections with many Habsburg Serbs. In 1796, Osman Pazvantoğlu, the renegade governor of the Sanjak of Vidin, who had rejected the authority of the Sublime Porte, launched an invasion of the Pashalik of Belgrade. Overwhelmed, Mustafa Pasha formed a Serbian national militia to help stop the incursion. Petrović joined the militia and became a "boluk-bashi" (), leading a company of 100 men.