Rebels and Loyalists
During the period of its long decline Bosnia's Muslims were in continual conflict with the Ottoman authorities and often in armed conflict them. Sarajevo's Muslims never rebelled against the sultan himself though but rather against the new governors appointed by the grand vizier. Punitive missions were sent out by the government but there was never enough money to keep these troops in Bosnia. "Repeated with many variations in the 1600s and 1700s, this pattern of events further weakened the city's economy and exacerbated internal bickering among leading Sarajevo Muslims."
Beginning in 1729, Sarajevans responded to growing insecurity by constructing a complex of walls, towers, and gates. These fortifications consisted of about three hundred meters of walls and four towers. Two gates and a portion of wall survive to this day. Since approaching conquerors could use the high ground of the surrounding hills to attack the city, the fortifications were of limited military value, but the gates enabled city officials to regulate routine entry into the city, and the walls prevented much unauthorized economic activity.
Donia goes on to point out here that despite often contesting the authority of governors sent by the sultan Sarajevo remained very much an Ottoman city:
The city's institutions remained Ottoman in character, and the city was administratively as much as ever part of the empire. The city's Muslims remained among the empire's loyal fighting forces, and many of them died for the sultan on battlefields near and far. Sarajevo Muslims responded to the Ottoman call-up of forces for the war against the Persian Empire in 1727. Of 5,200 officers and men from Bosnia, only 500 returned from the battlefield. In 1737, a contingent of 10,000 Bosnians was part of the Ottoman force that fought the Russian Empire. Only a handful returned, straggling back in the fall and winter of 1737.
In addition to serving on remote battlefields, Bosnian Muslim forces were periodically engaged to keep nearby territories under the sultan's rule. In 1712, Bosnian forces fought Montenegrin tribesmen who were making periodic raids into Herzegovina. Although the Montenegrins were driven back, many Muslims in the recaptured areas chose to leave with the Bosnian forces. Muslims from contested areas fled their homes and became refugees in the sanctuary of Sarajevo.
Sarajevo: A Biography. 2005. Robert Donia [C. Hurst & Co]