The Brothers' Quarrel () was a war of succession within the Árpád dynasty between Emeric, the King of Hungary, and his younger brother, Andrew, Duke of Slavonia. It lasted from 1197 to 1203, covering almost the entire reign of Emeric. The conflict had a significant impact on the development of the 13th-century society and political system in the Kingdom of Hungary.

Background The illustrious Béla III ruled Hungary from 1172 to 1196. His first wife was Agnes of Antioch, the mother of all of his children. Their first child, a boy named Emeric, was born in 1174. Andrew, the second son of Béla III and Agnes, was born around 1177.Kristó, Gyula; Makk, Ferenc (1996). Az Árpád-ház uralkodói [Rulers of the House of Árpád] (in Hungarian). I.P.C. Könyvek. p. 229, Appendix 4 Béla and Agnes had two other sons, Solomon and Stephen.Makk, Ferenc (1994). "III. Béla". In Kristó, Gyula; Engel, Pál; Makk, Ferenc (eds.). Korai magyar történeti lexikon (9–14. század) [Encyclopedia of the Early Hungarian History (9th–14th centuries)] (in Hungarian). Akadémiai Kiadó. pp. 91–92. pg. 92 One of them was still alive in early 1198.

In order to ensure the uninterrupted succession to the Hungarian throne, Béla III decided to crown his eldest son during his lifetime. Emeric was crowned king while still a child by Nicholas, Archbishop of Esztergom, on 16 May 1182. This method was unusual within the Árpád dynasty, which was plagued by many struggles for the throne throughout its history. After Solomon (1057) and Stephen II (1105), Emeric was the third heir to be crowned King of Hungary during the lifetime of his father, the reigning monarch. Béla III appointed Emeric to administer Croatia and Dalmatia around 1193 or 1194. Historian Gyula Kristó claimed Emeric's coronation in 1182 was forced against his father by the most powerful barons of the realm. In contrast, Szabados argued that Emeric did not independently issue a royal charter and did not have his own court. Bálint Hóman claimed that Béla III crowned his eldest son as co-monarch in the manner of the Byzantine emperors. Croatian historian Ferdo Šišić believed that Emeric was crowned as King of Croatia and Dalmatia in 1194, separately.

Following Béla III's successful invasion of the Principality of Halych in 1188, his younger son Andrew was installed as Prince of Halych. His nominal reign was unpopular and the loyal boyars expelled Andrew and his retinue from the principality in August 1189 or 1190. Upon his return to Hungary, Andrew did not receive a new duchy from his father, who only gave him some money, as well as some fortresses and estates in Slavonia. On his deathbed, Béla III, who had pledged to lead a crusade to the Holy Land, ordered Andrew to fulfill his vow. Béla III died on 23 April 1196, and Emeric succeeded him as King of Hungary without opposition.

Dynastic conflict Andrew's first conspiracy (1197)

Andrew used the funds that he inherited from his father to recruit supporters among the Hungarian lords. It is plausible that he demanded from his brother to install him as Duke of Slavonia, which, by the second half of the 12th century, increasingly became the traditional title of heir to the throne. Andrew also formed an alliance with Leopold VI, Duke of Austria, and plotted against Emeric. The king learned of the conspiracy and filed a complaint against his brother to Pope Celestine III, who threatened excommunication for those who supported the duke against Emeric. The united troops of Andrew and Leopold attacked and routed the Hungarian royal army at Mački (Macsek), Slavonia, in the late autumn of 1197. Under duress, King Emeric might have gave Croatia and Dalmatia to Andrew as an appanage. Regardless, a series of privilege letters in favor of Dalmatian coastal cities and ecclesiastical institutions prove that King Emeric intended to exercise his royal rights as King of Croatia and Dalmatia, whether Andrew held the ducal title or not.

In practice, Andrew administered Croatia and Dalmatia as an independent and sovereign monarch. He styled himself, "By the grace of God, Duke of Zadar and of all Dalmatia, Croatia and Hum" in his charters. Taking advantage of Miroslav of Hum's death, Andrew invaded Hum and occupied at least the land between the Cetina and Neretva rivers sometime before May 1198. Andrew minted coins, granted land and confirmed privileges in his territories. In accordance with the treaty with Emeric, the counties of Varaždin and Bodrog also belonged to his suzerainty. To further solidify his power, Andrew cooperated with the Frankopans, Babonići, and other local lords. Some of the prominent barons also supported his aspirations, including Macarius Monoszló and Andrew, Ban of Slavonia, the husband of princess Margaret (the aunt of Emeric and Andrew). Andrew also appointed his own bans, neglecting Emeric's royal prerogatives. Andrew acted as "caput ecclesiae in regno suo" (head of the church in his own country) over the Dalmatian ecclesiastical institutions, having previously he donated privileges to the Archdiocese of Split and the St. John monastery at Biograd in 1198. He also attempted to fill the then-vacant archiepiscopal sees of Split and Zadar with prelates who were loyal to him through elections in 1198. Pope Innocent III, who strongly supported Emeric in his feud against Andrew, refused to confirm these elections, and ordered investigation regarding the candidates' political relationship with the duke. In later years, the Holy See successfully prevented Andrew's partisans from occupying the ecclesiastical positions in Dalmatia. Overall, the local churches and cities attempted to maintain their neutrality during the feud between Emeric and Andrew. In several cases, the two brothers both issued the same grant to a particular church, since the clerics felt important to get confirmation both from their in order to keep the safeguard their rights and neutrality. Blaise, the chief notary of Zadar acknowledged Emeric as "our sovereign", while Andrew was referred to as only "duke" then "the king's brother, who is present in Dalmatia".

Pope Innocent III also instructed the archbishops and bishops of Hungary that no one should excommunicate or interdict the king's confidants, especially his chief supporter since his father's death, Ugrin Csák, Bishop of Győr. Weeks after his election, Innocent III sent a letter to Andrew on 29 January 1198, in which he urged Andrew to lead a crusade to the Holy Land in order to fulfill his vow. He threatened that if Andrew refused to fulfill his father's last will, he would be excommunicated and lose his status as heir to the Hungarian throne in favor of his younger brother, Solomon or Stephen (Andrew was the heir because Emeric did not have a child then).

Andrew's second conspiracy (1198–1199)

Despite the clear position of the Holy See, several prelates supported Andrew. In January 1198, Pope Innocent III had rebuked John, the abbot of Pannonhalma for conspiring with the duke against Emeric and ordered him to appear before the Roman Curia in person. However, the conspiracy continued against the king, which escalated in the spring of 1199. One of the pro-Andrew prelates, Boleslaus, Bishop of Vác complained to the Roman Curia that while the bishop and his canons celebrated a mass at the cathedral of Vác on 10 March 1199, Emeric and his soldiers violently broke into the building. The king himself physically assaulted Boleslaus, while his troops broke the lock, looted the treasury and confiscated numerous documents, which allegedly contained the preparations for a planned conspiracy against the monarch. Pope Innocent sent a letter to Emeric on 21 June 1199, in which he called on the king to reimburse the material damage to the cathedral and to compensate Boleslaus, unless he will impose an ecclesiastical penalty on Emeric (excommunication) and the kingdom (interdict). On the same day, Pope Innocent instructed Saul Győr, the Archbishop of Kalocsa to investigate the events and oversee that the king is carrying out the compensation. Initially, Emeric prevented the visitation of Saul to the royal court, hindering his mission.

Emeric denied any physical abuse in his reply letter, according to him, the canons of the cathedral chapter voluntarily opened the gate, and Boleslaus' involvement in the conspiracy was revealed. The king narrated in his letter to Pope Innocent that the bishop maintained relationship and corresponded with Duke Andrew and the other conspirators, and guarded their group's funds at the cathedral of Vác in order to finance their rebellion against Emeric. Since after the incident and the subsequent civil war, several barons defected to the court of Duke Andrew, it is plausible the king had good reason to open the cathedral treasury, according to Szabados. In his letter, Emeric also narrated that Mog, Palatine of Hungary secretly swore loyalty to Andrew, but he was deprived of his office, when his betrayal was revealed. Mog's defection encouraged Andrew to rebel against his rule and make an attempt to gain the Hungarian throne. When Emeric attempted to appoint his partisan Mika Ják as the new palatine, Boleslaus' brother, Elvin, Bishop of Várad excommunicated the lord, because he had formerly captured one of the bishopric's priests, who functioned as a messenger of the king's enemies who supported Duke Andrew. Emeric claimed the neglect of Saul Győr was due to the safety of the archbishop, whose lives would have been endangered by the adherents of the pro-Andrew prelates in the royal court.

After the plot was uncovered, a civil war broke out between Emeric and Andrew. During the clashes, the Diocese of Zagreb (in Slavonia) suffered heavy damage. In the summer of 1199, royal troops routed Andrew's army in the valley of Rád near Lake Balaton in Somogy County, and Andrew fled to Austria, where Duke Leopold sheltered him and his retinue. In retaliation, Emeric's advancing army ransacked and plundered the Austrian and Styrian border region along Hungary. Thereafter, Emeric took steps to bring Croatia and Dalmatia back under his control. He appointed his former tutor Bernard of Perugia, the Archbishop of Split as the royal governor of the coastal city. The name of Andrew disappeared from the datation style as used by notaries of Dalmatian cities, including Zadar in the second half of 1199. Emeric also installed his partisans Nicholas then Benedict as bans of Croatia and Dalmatia. For the losses of his diocese, Emeric compensated Dominic, Bishop of Zagreb with several privileges and tax exemptions in 1199–1200.

First reconciliation (1200–1203)