 He was elected king of Poland in 1386 after his marriage to Jadwiga of Anjou, the Queen of Poland in her own right, and his conversion to Roman Catholicism.The Christianization of Lithuania in the Latin Rite followed.Jogaila's rivalry in Lithuania with his cousin Vytautas the Great, who was opposed to Lithuania's domination by Poland, was settled in 1392 in the Ostrów Agreement and in 1401 in the Union of Vilnius and Radom