 However, the Hungarian barons elected her brother-in-law, Ladislaus II, who granted one third of the Kingdom of Hungary to Maria's husband.Following the sudden death of King Ladislaus II on 14 January 1163, her husband was proclaimed king.However, King Stephen IV was defeated on 19 June 1163 by his nephew, King Stephen III, and was obliged to flee again to the Byzantine Empire, where he died while still struggling against his nephew on 11 April 1165.