The War of Hum was fought in 1326âÂÂ1329 between the Banate of Bosnia under Stjepan II Kotromaniàand the Kingdom of Serbia under Stefan DeÃÂanski NemanjiÃÂ.
Branivoje who served King Stefan Milutin Nemanjià(r. 1282âÂÂ1321) was given to rule over the city of Ston and Peljeà ¡ac peninsula. His family had by 1325 emerged as the strongest in Zahumlje (or Hum). Probably at their highest point they ruled from Cetina river to the town of Kotor. Though nominal vassals of Serbia, the Branivojeviàfamily attacked Serbian interests and other local nobles of Hum, who in 1326 turned against Serbia and the BranivojeviÃÂi. The Hum nobility approached Stjepan KotromaniàII, the ban of Bosnia, who then entered conflict with Serbia.
In 1326, Ban Stephen II attacked Serbia in a military alliance with the Republic of Ragusa and conquered Zahumlje, gaining access to the Adriatic Sea and including a large Eastern Orthodox Christian population and the Eastern Orthodox Church. This changed the balance of religion in Bosnia, as the Bosnian Krstjani, as the adherents of the Bosnian Church called themselves, had lost its majority in the realm. He also expanded into Zavrà ¡je, including the fields of GlamoÃÂ, Duvanj and Livanj. The province of Zahumlje was ruled by the local noble family of BranivojeviÃÂs who had tricked Stefan DeÃÂanski's vassal Prince, Crep, who was a close friend, so King Stefan had no desire to defend those areas from Ban Stephen's forces.
Bosnia controlled the territory from the border with Ragusa in DubrovaÃÂka Rijeka along the coast to Neretva, and further to Omià ¡. Ban Stephen II killed two members of the BranivojeviÃÂ, while Branko Branivojeviàfled to Serbia and sought help from King Stefan and then headed to Ragusa, from where he proceeded to Ston. Ban Stephen pursued Branko, but eventually the Ragusan forces caught the last of the four Branivojeviàbrothers.
The Bosnian titles included Lord of the Hum Land ever after. Ban Stephen became the ruler of all the lands from Cetina to Neretva with the exception of Omià ¡, which was taken by the Hungarians.
In 1329, Ban Stephen II of Kotromaniàpushed another military attempt into Serbia with limited success, assaulting Lord Vitomir of Trebinje and Konavli, but the main portion of his force was defeated by the Young King Stefan Duà ¡an who commanded the forces of King Stefan of DeÃÂani at Pribojska Banja. The Ban's horse was killed in the battle, and he would have lost his life if his vassal and retainer, Vuk VukoslaviÃÂ, had not given him his own horse. By doing so, Vuk sacrificed his own life, and was killed in open battle. Thus, the Ban's campaign was partially successful, as he managed to add Nevesinje and parts of à ¾upa Zagorje (area between rivers of Upper Neretva, Bistrica and Sutjeska) to his realm.
Although the Zahumljans mostly accepted the Ban's rule, some resisted, like Petar ToljenoviÃÂ who ruled the Primorje () from his capital in Popovo; he was the grandson of the famous Zachlumian Prince Andrew. Petar raised a rebellion, wishing either more autonomy or total independence. He lost a battle against Ban Stjepan II and was imprisoned and put in irons. Ban Stjepan had him thrown with his horse off a cliff. Peter survived for a full hour after the fall.
The Ban's vassal that governed Zahumlje started to raid Ragusan trade routes, which worsened Bosnian-Ragusan relations that were very high during the conquest of Zahumlje. To make matters worse, Ban Stjepan II asked Ragusa to pay him the old traditional tax that they traditionally paid to the Serbian rulers and even asked them to recognize his supreme rule. The Republic of Ragusa refused with the explanation that it belongs to certain Dediàfamily from à ¾upa Popovo and that neither the Serbian nor the Bosnian rulers nor the Knez of Hum have a right to it.