In 1717, the Sanjak was again occupied by
Austria, to which it was ceded in 1718 following the
Treaty of Požarevac. The Sanjak of Smederevo remained under Austrian rule for 20 years, as the
Kingdom of Serbia, until it was reconquered by the Ottomans following the
Austro-Turkish War (1737–1739) and the
Treaty of Belgrade. Belgrade, the center of the region while under Austrian rule, became neglected under the Ottomans whereas Smederevo (Semendire) regained its former role as an administrative center. Nevertheless, Belgrade eventually became the seat of a
pasha with the title of
vizier. In 1788,
Koča's frontier rebellion saw eastern
Šumadija occupied by Austrian Serbian
freikorps and
hajduks. From 1788 to 1791, Belgrade was again under Austrian rule after Koča's rebellion. The
Siege of Belgrade from 15 September to 8 October 1789, a Habsburg Austrian force besieged the fortress of Belgrade. The Austrians held the city until 1791 when it handed Belgrade back to the Ottomans according to the terms of the
Treaty of Sistova. The Belgrade treasury was attached to the new reform treasury since 1 March 1793. It was decided in mid-1793 that a
muhassıl administer the Belgrade treasury, and this was entrusted to the new
mühafiz of Belgrade,
Hadji Mustafa Pasha, who thereby held all powers in the province. In 1793 and 1796 Sultan
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 Pashaluk as he saw them as a threat to the central authority of
Hadji Mustafa Pasha. Many of those janissaries were employed by or found refuge with
Osman Pazvantoğlu, a renegade opponent of Sultan
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 Sultan Selim III, causing much volatility 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 on 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. By 1799 the janissary corps had returned, as they were pardoned by Sultan's decree, and they immediately suspended the Serbian autonomy and drastically increased taxes, enforcing martial law in Serbia. On 15 December 1801, the popular
Vizier of Belgrade
Hadji Mustafa Pasha, a trusted ally of Selim III, was murdered by
Kučuk Alija. Alija was one of the four leading
Dahijas, Janissary commanders who were opposed to the Sultan's reforms. This resulted in the Sanjak of Smederevo being ruled by these renegade
janissaries independently from the Ottoman government. Several district chiefs were murdered in the
Slaughter of the Knezes on February 4, 1804, by the renegade janissaries. This sparked the
First Serbian Uprising (1804–13), the first phase of the
Serbian Revolution. After the
Pashalik of Belgrade fell back to the Ottoman rule, various acts of violence and confiscation of people's properties took place. Islamized Serbs and Albanians especially took part in such actions. Despite suppression of the uprising in 1813 and
Hadži Prodan's Revolt in 1814, the
Second Serbian Uprising led by Duke
Miloš Obrenović succeeded with creation of semi-independent
Principality of Serbia in 1817 (confirmed with
Ferman from
Mahmud II in 1830), gained independence in 1878 by
Treaty of San Stefano and evolved to
Kingdom of Serbia in 1882. This marked the end of the Sanjak. ==Demographics==