The Congress of Berlin took place between June 13th and July 13th 1878. It was attended by representatives of France, Britain, Russia, Austria-Hungary, Germany and Italy. In other words, substitute Austria-Hungary for the US, exactly the same countries which constitute the Contact Group which have tried to manage Balkan affairs in our times. "The Treaty of Berlin gave Austria-Hungary," writes Donia, "the right to 'occupy and administer' Bosnia-Herzegovina but not to annex it." (That happened only in 1908.) By this time Ottoman authority had already crumbled in Bosnia but what was to replace it was not clear. As Donia writes however, the prospect of Austro-Hungarian rule was seen very differently by different Bosnians:
Many Bosnian Catholics in Sarajevo welcomed the notion of occupation by coreligionists. Many Serbian Orthodox Bosnians, on the other hand, were disappointed that neither Serbia nor Montenegro was given any role in Bosnia, and they found little reason to cheer an impending invasion by Serbia's nemesis, the Habsburg monarchy.
The prospect of Austro-Hungarian rule divided Bosnian Muslims along social lines. Wealthy and influential landowners, closely tied to officials of the waning Ottoman regime, supported the change. They hoped that a smooth transfer of power would enhance their value to the new rulers and help preserve their privileged status and property rights. Many religious authorities and urban lower class Muslims, centered in the marketplaces of Sarajevo and other towns, were stridently opposed. They viewed the prospect of Habsburg rule as a triple threat, combining the liabilities of occupation by a foreign power, rule by the dreaded Christian infidel, and the end of hopes for Bosnian autonomy.
Sarajevo underwent upheaval as a People's Assembly was formed to take control of the situation. By late July, before the Austro-Hungarian entrance into Bosnia, Sarajevo was in turmoil and military resistance was being prepared. On July 29th Austro-Hungarian troops entered the country.
...units were segregated by confession: each unit drew its volunteers from a single religious community, and units subsequently dispatched from the city were likewise segregated. Foreign consuls marveled at the lack of logistical support and the decentralised nature of the forces. "There is no organization of any kind, no arrangement for regular and continuing provisioning of the men, no plan of operation and, above all, no one in whom is vested the supreme command," reported British consul Freeman. "Every little band of men acts entirely on its own responsibility."
Sarajevo: A Biography. 2005. Robert Donia [C. Hurst & Co]