Several sons of Gediminas continued his male line, but it was Algirdas who continued the main Gediminid line. Before deposing his brother Jaunutis in 1345, he ruled Kreva and, despite remaining pagan, married Maria, a daughter of the last prince of Vitebsk. After 1345 he became the Grand Duke of Lithuania and shared his power with his brother Kęstutis. Their successful collaboration is celebrated in Lithuanian historiography, and gave rise to a much debated theory that a tradition of co-rule or diarchy in Lithuania was customary and arose as early as 1285. The Grand Duchy experienced its greatest expansion during their reign. While Algirdas was mostly active in the east, Kęstutis occupied himself by managing the Duchy's interactions with the Teutonic Knights, Poland, and other western European entities. In 1350 Algirdas contracted a second marriage with Uliana of Tver; he chose their son Jogaila as the next Grand Duke. In 1385 Jogaila opened a new chapter in the history of Lithuania by converting the country to Christianity and signing a personal union with Poland, becoming King of Poland. This Polish–Lithuanian union, in various forms, survived until the third partition of the Polish–Lithuanian Commonwealth in 1795. Jogaila's branch of the Gediminids is known as the Jagiellon dynasty.