In 1320 Maria married Dmitri of Tver, ruler of a Russian principality. The marriage took place soon after Mikhail Yaroslavich, Dmitri's father, was killed; his sons were searching for strong allies against Yury of Moscow, their principal competitor for the throne of Vladimir and All Rus'. After 1327 Lithuania began to supplant Tver as Moscow's chief rival for supremacy in the Rus'. When Tver sought to rival Moscow, it needed an alliance with Lithuania. Dmitri was killed in 1325 and Maria never remarried. Maria's brother-in-law, Alexander I, nevertheless maintained friendly relationships with the Grand Duchy of Lithuania and his daughter Uliana married Algirdas, the son of Gediminas, who continued the Gediminid line. The cooperation between Lithuania and Tver lasted well into the 15th century.