The principality of Montenegro was a vassal of Ottoman Empire. During the first half of the 19th century the Ottoman dominance was weakened and Nikola I, the prince of Montenegro, felt free to support a rebellion in the neighbouring Ottoman province of Herzegovina. Ottoman general Ömer Pasha, who was in charge of suppressing the rebellion, defeated the rebels and marched towards Cetinje (then the capital of Montenegro) .