[5] The abolishment of the Spahi system and the Janissaries was the beginning of the reforms, with ultimate goal to transforming the theocratic Ottoman Empire into a constitutional monarchy.
The reforms announced from Istanbul were seen as "infidel" because they copied Europe in order to strengthen the empire and were seen as a threat to Islam.
[8] That year, Sultan Mahmud II introduced the reformed Nizam military[9] and effectively disbanded the Janissaries throughout the empire.
In Sarajevo, after the decree on their disbandment was read on 20 July 1826, they gathered near Emperor's Mosque, refused to acknowledge the newly appointed commander, and elected their existing leader Ali Agha Ruščuklija.
[10] In order to gain support, the Janisaries organised the meeting of all of the Bosnian kadis on 3 October 1826 and sent the Sultan a plead to maintain their unit in Bosnia, emphasizing their contribution to the defence of the Empire.
[9] Abdurahman Pasha received an order in mid-December 1826 to finally end the revolt of the Janissaries, who enjoyed wide support among the Bosnian Muslims.
[13] The Ottoman military of 1,000, commanded by Ali Pasha Vidajić, the captain of Zvornik, finally crushed the Janisaries in February 1827.
[14] The help promised to the Janisaries from the ayans of Foča, Pljevlja, Rogatica, Višegrad, Vlasenica, Birča, Tuzla, Bijeljina, Tešanj, Zenica, Travnik, Skoplje, Livno, Mostar, Gacko and Nevesinje never arrived.
The majority of the ayans remained neutral, and some of them, including Husein Gradaščević and Ali Bey Fidahić,[7] as well as Herzegovinian captains of Klobuk, Stolac and Trebinje supported the Vizier.
Avdo Sućeska considers that the reason for the disunity of the ayans was in the sense of loyalty the Bosnian Muslims had towards the Ottoman Empire and the Sultan as well as the religious leader, the Shaykh al-Islām.
[7] The ayan council was divided towards the reforms and split on a regional basis with Herzegovinian notables supporting the Sultan.
Since Travnik was the seat of the Bosnian eyalet and the vizier, the planned meeting was in effect a direct confrontation with Ottoman authority.
In front of the Emperor's Mosque, those present swore on the Qur'an to be loyal to Gradaščević and declared that, despite potential failure and death, there would be no turning back.
During this lull in armed conflict with the Ottomans, attention was turned to the autonomy movement's strong opposition in Herzegovina.
A small campaign was launched against the region from three different directions: As it happened, Namik-paša had already abandoned Stolac, so this attack was put on hold.
His true intentions, however, were manifested by early December when he attacked Bosnian units stationed on the outskirts of Novi Pazar.
Receiving information that the Bosnian ranks were depleted due to the winter, the captain of Stolac Ali-paša Rizvanbegović broke the siege, counterattacking the rebels and dispersing their forces.
A force had already been sent towards Stolac from Sarajevo, under the command of Mujaga Zlatar, but was ordered back by Gradaščević on March 16 after he received news of a major offensive on Bosnia being planned by the Grand Vizier.
When the Vizier's troops succeeded in crossing the Drina, Gradaščević ordered 6,000 men under Ali-paša Fidahić to meet them in Rogatica while units stationed in Višegrad were to head to Pale on the outskirts of Sarajevo.
The Bosnian army was led by Gradaščević himself, while the Ottoman troops were under the command of Kara Mahmud Hamdi-paša, the new imperially recognized vizier of Bosnia.
Near the very end, however, Herzegovinian troops under the command of Ali-paša Rizvanbegović and Smail-aga Čengić broke through defenses Gradaščević had set up on his flank and joined the fighting.
Upon realizing the difficulties that his home and family would experience if he stayed there, Gradaščević decided to leave Gradačac and continue on to Austrian lands instead.