[3] The Congress of Berlin of 1878 assigned two Ottoman provinces, the Vilayet of Bosnia and the Sanjak of Novi Pazar to administration by Austro-Hungary.
In July of the same year Austrian troops began the occupation of the two provinces but encountered widespread resistance from the Muslim population of Bosnia.
There was ongoing communal tension and resistance to Habsburg rule in many rural areas, especially in Herzegovina and along the eastern border with Montenegro.
"[5]: 138 "In November 1881 the Austro-Hungarian government passed a Military Law (Wehrgesetz) imposing an obligation upon all Bosnians to serve in the Imperial Army.
[7] The Austrians appealed to the Mufti of Sarajevo, Mustafa Hilmi Hadžiomerović (born 1816) and he soon issued a Fatwa "calling on the muslims to obey military Law.
Infantry formations were first set up in 1882 in each of the four main recruiting districts of Sarajevo, Banja Luka, Tuzla, and Mostar.
In 1894 the military administration set up the Bosnian Herzegovinian Infantry Regiment Association (Regimentsverband der Bosnisch-Hercegowinischen Infanterie) in order to integrate them into the rest of the Imperial Austrian army.
[9] Immediately prior to the outbreak of World War I the four Bosnian-Herzegovinian infantry regiments numbered 1 thru 4 containing 10,156 men (plus 21,327 reservists) in 12 battalions.
Another prominent Bosnian officer to rise in the ranks was Colonel Hussein Biscevic (Husein Biščević or Biščević-beg) who later served in the Waffen SS.
Officers and cadets usually wore standard Austrian military infantry rigid black caps or full-dress shakos.
[20] During the early months of World War I the pike-grey uniform proved too conspicuous against the dark forest backgrounds common on the Eastern Front.
[21] In practice, supply shortages led to mixtures of field-grey, pike-grey and even peacetime blue clothing being worn for the remainder of the war.
Many Bosnian soldiers from the Second Regiment died over 1916 and 1917 in fighting in north Italy during World War I and were subsequently buried in the small village of Lebring-Sankt Margarethen, near Graz, Austria.
Since 1917 locals have held a modest memorial service to mark the anniversary of the Battle of Monte Meletti in South Tyrol, only interrupted briefly during the Nazi period.
An impassable ridge defended by Bosnian soldiers four kilometers north of Gorizia is now called the "Passo del Bosniaco" (Pass of the Bosniak).