Wars with the Byzantine Empire (1164–1167)
Emperor Manuel sent an army to Hungary to help Stephen IV to regain the throne from his nephew. The young Stephen sought assistance from Vladislaus, King of Bohemia, against his uncle and the Byzantines, but the Bohemian barons refused to fight. Thereafter Stephen III sent envoys to Emperor Manuel, but "they promised nothing genuine", according to Kinnamos. The Emperor continued his campaign, but in short "realized that it was then impossible for" his protégé "to rule the Hungarians' land", and opened negotiations with Stephen III. According to their peace treaty, Emperor Manuel recognized the rule of the young Stephen, and the latter agreed to send his brother, Béla, to Constantinople. Stephen III also promised that he would allow the Byzantines to take control of Béla's duchy.
Abandoned by Emperor Manuel, Stephen IV approached Frederick I, Holy Roman Emperor. Around the same time, a group of Hungarian barons and prelates sent a letter to Emperor Frederick, stating that they were willing to accept his suzerainty. Stephen III also dispatched his envoys to Frederick, who decided not to intervene, but ordered his vassals—the King of Bohemia, the Duke of Austria, and the Margrave of Styria—to keep an eye on the political situation in Hungary. King Vladislaus' son, Sviatopluk, even married Stephen III's sister, Odola. The betrothal of Stephen III to an unnamed daughter of Yaroslav Osmomysl, Prince of Halych, was also arranged around this time.
Next year Stephen broke his treaty with Emperor Manuel I and "usurped Béla's heritage", according to Kinnamos. A charter of 1164 of Peter, Archbishop of Spalato (now Split, Croatia) was dated in reference to the rule of Stephen III and his ban, Ampud, suggesting that at least a part of Béla's duchy—Central Dalmatia—was under Stephen III's rule in that year. On the other hand, Stephen III's dethroned uncle invaded Sirmium where masses of the residents celebrated his return. Accompanied by the forces of King Vladislaus of Bohemia, and auxiliary troops from Austria and Halych, Stephen III launched a campaign against him. Emperor Manuel I, who was about to march against Armenian Cilicia, returned to the Danube and stormed into Hungary, advancing as far as Bács (now Bač, Serbia). He contacted King Vladislaus and persuaded him to negotiate a peace treaty with Stephen III. Abandoned by his most important ally, Stephen III was obliged to renounce Sirmium in favor of the Byzantine Empire, but only after the Emperor promised that he would never support his uncle. Even so, Emperor Manuel allowed the dethroned king to stay in Sirmium.
We have come, my boy, not to wage war on the Hungarians but to recover his land for Béla, your brother, not something which we have torn away by our might, but which you and your father long before granted. Also to rescue from peril your uncle Stephen, who is related by marriage to our majesty. If it is according to your will that Béla should be our son-in-law, something which was previously agreed by you, why do you quickly abandon our friendship by failing to render him the land? If you oppose the marriage, and something else seems right to you in regard to it, know that we abstain from constraining you further.
In short, Stephen III invaded Dalmatia, although he had pledged to Vitale II Michiel, Doge of Venice, that he would withdraw from the Dalmatian towns. Upon Stephen's arrival the citizens of Zadar expelled the Venetian governor and accepted his suzerainty. He again stormed into Sirmium and laid siege to his uncle in Zimony in spring 1165. Emperor Manuel decided to make a counterattack, but a rebellion by his cousin Andronikos Komnenos prevented him from marching to the Danube. Nevertheless, Manuel I sent envoys to the monarchs who had earlier supported Stephen III, persuading them to remain neutral in the conflict. Stephen III's uncle died of poisoning during the siege of Zimony, on 11 April. The fortress soon fell to Stephen III. The Byzantine counter-offensive started at the end of June. An army under the command of Emperor Manuel I laid siege to Zimony and recaptured it; another Byzantine force invaded and occupied Bosnia and Dalmatia. The Venetian fleet intervened on the Byzantines' side in Dalmatia, forcing Zadar to again accept the rule of the Doge. Stephen III could only conclude a new peace treaty with Emperor Manuel after he renounced Sirmium and Dalmatia.
[Stephen] sent envoys to the emperor, men of the aristocracy and one who enjoyed the office of bishop, and agreed to render [Sirmium] again to the Romans, and in addition the whole of Dalmatia. When they came in sight of the emperor, they uttered what had been commanded to them and petitioned the emperor to abandon his wrath. At first he refused, saying, "It would indeed be estimable, envoys, if someone thought it proper to restore those things which he had previously stolen. We hold [Sirmium], we have regained [Zimony], we are already masters of the Dalmatians, we are lords of all those together, of which you the givers have been deprived. So then is there among you another [Sirmium]? Is there another [Zimony] and Dalmatia which you now come giving us? ..." So he first answered them, then changing his mind, he said, "But then, so that you may know that we wish to make peace as a gift to you, who are Christians, come, take the oaths."
A Hungarian army under the command of Ispán Denis stormed into Sirmium once more in spring 1166. The Hungarians routed a Byzantine army, and occupied the whole province with the exception of Zimony. Emperor Manuel sent three armies against Hungary. The first army, which was under the command of protostrator Alexios Axuch and Stephen III's brother, Béla, was stationed by the Danube to distract attention from the movements of the two other units, which plundered Transylvania under the command of Leon Batatzes and John Doukas. The Byzantine campaign caused great devastation in the eastern territories of the Kingdom of Hungary, forcing Stephen III to seek reconciliation. Upon his request, Henry Jasomirgott, Duke of Austria, whose wife was Emperor Manuel's niece, mediated an armistice. At the end of the year, Stephen married the Duke's daughter Agnes. Around the same time, a Hungarian army invaded Dalmatia and captured Nikephoros Chalouphes, the Byzantine governor of the province. Stephen confirmed estates in Biograd na Moru and the privileges of Šibenik in 1166 and 1167, respectively, proving that the two towns accepted his suzerainty after the campaign.
Emperor Manuel dispatched an army to Sirmium and sent his fleet to Zimony after Easter 1167. The Hungarians assembled their troops, and recruited no small number of allied forces as mercenaries, especially Germans, according to Choniates. The contemporaneous Rahewin writes that Stephen III "made war on the emperor of the Greeks" because he had received and assisted his brother, Béla. According to Rahewin and Henry of Mügeln, Stephen received support from his father-in-law, Duke Henry Jasomirgott. However, the Byzantine army led by Andronikos Kontostephanos annihilated the Hungarians, who were under the command of Ispán Denis, in a decisive battle which was fought near Zimony on 8 July. Kinnamos wrote that "the war on the Hungarians" concluded on the battlefield. According to Henry of Mügeln, Stephen signed a peace treaty renouncing the duchy that their father had bequeathed upon his brother, Béla. He also came to terms with Doge Vitale Michiel, giving his niece, Mary, to the Doge's son, Nicholas, on 17 December 1167, according to the early 13th-century History of the Doges of Venice.