When did Serbia accept annexation of Bosnia ?
At the Congress of Berlin in 1878 , the Austro - Hungarian Foreign Minister Gyula Andrássy obtained the occupation and administration of Bosnia and Herzegovina , and he also obtained the right to station garrisons in the Sanjak of Novi Pazar , which remained under Ottoman administration .