 In 1391 Ivan escorted Sophia, the only child of Vytautas, to Moscow where she married Vasili I of Russia.After Vytautas gained a powerful ally in the east, Jogaila agreed to make peace and Treaty of Astravas was signed in 1392.Ivan became the right hand of Vytautas, and after Skirgaila death, he ruled Kiev as viceregent.