It effectively ceased to exist as an Ottoman province after the Austro-Hungarian campaign in Bosnia and Herzegovina in 1878, although it formally existed for thirty more years until 1908, despite being governed by Austria-Hungary. This excluded Old Herzegovina, which was ceded to the Principality of Montenegro in 1878. In 1908, during the Bosnian Crisis, Austria-Hungary formally annexed it into its own territory.