After the rule of the Jagiellonian dynasty ended in 1572, Henry of Valois (later King Henry III of France) was the winner of the first "free election" by the Polish nobility, held in 1573. He had to agree to the restrictive "pacta conventa" obligations and fled Poland in 1574 when news arrived of the vacancy of the French throne, to which he was the heir presumptive. From the start, the royal elections increased foreign influence in the Commonwealth as foreign powers sought to manipulate the Polish nobility to place candidates amicable to their interests. The reign of Stephen Báthory of Hungary followed (r. 1576–1586). He was militarily and domestically assertive and is revered in Polish historical tradition as a rare case of successful elective king. The establishment of the legal Crown Tribunal in 1578 meant a transfer of many appellate cases from the royal to noble jurisdiction.