The Union of Horodło or Pact of Horodło was a set of three acts signed in the town of Horodło on 2 October 1413. The first act was signed by Władysław II Jagiełło, King of Poland, and Vytautas, Grand Duke of Lithuania. The second and third acts were composed by the Polish nobility (szlachta) and Lithuanian boyars, respectively. The union amended the earlier Polish–Lithuanian unions of Krewo and Vilnius–Radom. Politically, Lithuania received more autonomy as, after the death of Vytautas, the Lithuanian nobles could choose another Grand Duke instead of passing the title to Władysław II Jagiełło or his heir. However, culturally, Lithuania and Poland grew closer. Lithuania adopted Polish institutions of castellans and voivodes. Catholic Lithuanian nobles and church officials were granted equal rights with the Polish nobles and clergy. Forty-seven selected Lithuanian nobles were adopted by Polish families and granted Polish coats of arm. Thus the union signified the beginnings of the Polonization of Lithuanian culture and the rise of the Lithuanian nobility. It was one of the major steps towards the modernization and Europeanization of Lithuania.