When Béla died in 1063, his sons Géza, Ladislaus and Lampert had to flee from the Kingdom of Hungary, because their cousin, Solomon (who had already been crowned in 1057) returned followed by the troops his brother-in-law, Henry IV, Holy Roman Emperor provided him. Shortly afterwards, King Bolesław II of Poland provided military assistance to the three dukes thus they could return to the kingdom. However, the parties wanted to avoid the emerging civil war and therefore they made an agreement on 20 January 1064 in Győr. Under the agreement, the three brothers: Géza, Ladislaus and Lampert accepted the rule of their cousin, King Solomon who conceded them their father's former duchy (the Ducatus).