In 1793 and 1796 Selim III proclaimed firmans, which gave more rights to Serbs. Among other things, taxes were to be collected by the "obor-knez" (dukes); freedom of trade and religion were granted and there was peace. Selim III also decreed that some unpopular janissaries were to leave the "Belgrade Pashalik", as he saw them a threat to the central authority of Hadži Mustafa Pasha. Many of those janissaries were employed by or found refuge with Osman Pazvantoğlu, a renegade opponent of Selim III in the Sanjak of Vidin. Fearing the dissolution of the Janissary command in the Sanjak of Smederevo, Osman Pazvantoğlu launched a series of raids against Serbians without the permission of the Sultan, causing much instability and fear in the region. Pazvantoğlu was defeated in 1793 by the Serbs at the Battle of Kolari. In the summer of 1797 the sultan appointed Mustafa Pasha to the position of beglerbeg of Rumelia Eyalet and he left Serbia for Plovdiv to fight against the Vidin rebels of Pazvantoğlu. During the absence of Mustafa Pasha, the forces of Pazvantoğlu captured Požarevac and besieged the Belgrade fortress. At the end of November 1797 obor-knezes Aleksa Nenadović, Ilija Birčanin and Nikola Grbović from Valjevo brought their forces to Belgrade and forced the besieging janissary forces to retreat to Smederevo.